Forum Moderators: coopster

Message Too Old, No Replies

Problems with phpmyadmin config

         

steven420

2:59 am on Oct 31, 2008 (gmt 0)

10+ Year Member



Hi, I am having problems with phpmyadmin. I have multiple databases and when I try to access one of the databases through DB webadmin in plesk the same database comes up everytime for every user. It doesn't show me any other databases even though I am selecting a different DB. I'm not sure how to set it up so that each user can only use their database and how to set up multiple users in the config.

Please help.
Thanks,
Steve.

phparion

8:10 am on Oct 31, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



in my opinion, phpmyadmin cannot do this for you. you need to assign specific database to the specific users. until and unless you have assigned a database to a user, he cannot open it for editing. you can check a user access on dbs by

mysql> SHOW GRANTS FOR username@localhost;

you can assign user to database as

GRANT SELECT ON `databasename`.* TO 'user'@'localhost'

GRANT USAGE ON *.* TO 'user'@'localhost' IDENTIFIED BY PASSWORD 'phppunk'

steven420

6:28 pm on Oct 31, 2008 (gmt 0)

10+ Year Member



Thanks for the reply. Each Database has a specific user but when the database is accessed through DB webadmin only the one database is displayed no matter what user/database is selected. In the config.inc.php file do you have to make a config for each user? This is my config ( I left out some things. ):

/* Servers configuration */
$i = 0;

/* Server localhost (config:USERNAME) [1] */ DO I HAVE TO HAVE AN ENTRY LIKE BELOW FOR EACH USER/DATABASE?
$i++;

$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['port'] = 'port num';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['controluser'] = 'Control user name';
$cfg['Servers'][$i]['controlpass'] = 'Control pass';
$cfg['Servers'][$i]['auth_type'] = 'http';
$cfg['Servers'][$i]['user'] = 'User Name';
$cfg['Servers'][$i]['password'] = 'User pass';
$cfg['Servers'][$i]['only_db'] = '';
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin.......';

/* End of servers configuration */

steven420

5:32 pm on Nov 2, 2008 (gmt 0)

10+ Year Member



Problem solved. I just had to delete the config.inc.php file and that fixed the problem.