Web Hosting Talk







View Full Version : PhpMyAdmin and Permissions


eddy2099
08-26-2002, 01:28 PM
I just installed PhpMyAdmin on my RaQ 4 and was having some problem trying to configure MySQL.

At root access, I can see all tables of all database which is great. But at user level, I want to be able to only expose the database which is related to them, how do I do it ? They keep showing all all databases which sort of defeats the purpose.

Is there a way to associate a database to a specific User and without showing them to others ?

Thanks.

nexcess.net
08-26-2002, 02:08 PM
If you follow the Documentation.txt file regarding http authentication and setup a phpMyAdmin mysql user it will work just as you want it too. Just set 'auth_type' to http and 'controluser' and 'controlpass' to the user you gave access to your mysql tables for phpMyAdmin (read the Doc.txt about exactly how to give the phpMyAdmin user access).

Chris

eddy2099
08-26-2002, 07:03 PM
Thanks. I did not realized that there was any documentation which came with it. I got the file as a PKG file and installed it as a PKG file. I will try to hunt it down. Thanks again.

x222943
08-26-2002, 07:34 PM
simply run this on the database "mysql" (changing the username and passwords in bold)



GRANT USAGE ON mysql.* TO 'username'@'localhost' IDENTIFIED BY 'password';
GRANT SELECT (Host, User, Select_priv, Insert_priv, Update_priv, Delete_priv, Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv, File_priv, Grant_priv, References_priv, Index_priv, Alter_priv) ON mysql.user TO 'username'@'localhost';
GRANT SELECT ON mysql.db TO 'username'@'localhost';
GRANT SELECT (Host, Db, User, Table_name, Table_priv, Column_priv) ON mysql.tables_priv TO 'username'@'localhost';


and then open up config.inc.php, setting the control user and password, and also set the authtype to http as nexcess.net said.

eddy2099
08-26-2002, 10:27 PM
Thanks. I will do that.