PDA

View Full Version : granting mysql privleges in phpmyadmin


stahler
01-04-2004, 11:51 PM
Hi folks, I read in my php book that if you create a website and a mysql database connection string, you should limit the privleges that the user in the connection string has, for security reasons. The book I have only mentions how to do this using the MySQL client. Ive looked at phpmyadmin on my site host and there is no way to GRANT privleges through phpmyadmin (or am I wrong). Is there a way to do this using phpmyadmin? If there is no way, is it because there is no security risk or what?

TIA

Bill

Timothy
06-01-2004, 02:50 PM
PHPMyAdmin can do this because the permissions are stored in a database called mysql. You may not have permission to this if you are on a virtual server.

Another way to do it via phpmyadmin is to submit the sql directly.


GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, FILE, INDEX ON tablename.* TO username@'%' IDENTIFIED BY 'password'

Just take out the necessary privileges.