Reputation: 31
I have a phpmyadmin installation on a Debian Server and it seems to me like phpmyadmin is ignoring the /etc/phpmyadmin/config.inc.php.
I created a user which should only be able to read one database. When I login to phpmyadmin I get the error message:
Connection for controluser as defined in your configuration failed.
So I checked the configuration file. In my case it should be /etc/phpmyadmin/config.inc.php
Right now (after many changes) this file contains this:
$i = 0;
$i++;
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = false;
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';
$cfg['Servers'][$i]['favorite'] = 'pma__favorite';
$cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
$cfg['Servers'][$i]['central_columns'] = 'pma__central_columns';
$cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings';
$cfg['Servers'][$i]['export_templates'] = 'pma__export_templates';
$cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches';
$cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
$cfg['Servers'][$i]['users'] = 'pma__users';
$cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
$cfg['Servers'][$i]['controluser'] = 'phpmyadmin';
$cfg['Servers'][$i]['controlpass'] = 'secret_password';
$cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';
$cfg['Servers'][$i]['relation'] = 'pma__relation';
$cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
$cfg['Servers'][$i]['table_info'] = 'pma__table_info';
$cfg['Servers'][$i]['column_info'] = 'pma__column_info';
$cfg['Servers'][$i]['history'] = 'pma__history';
$cfg['Servers'][$i]['recent'] = 'pma__recent';
$cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';
$cfg['Servers'][$i]['tracking'] = 'pma__tracking';
$cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';
$cfg['Servers'][$i]['designer_coords'] = 'pma__designer_coords';
$cfg['Servers'][$i]['hide_db'] = '^(information_schema|performance_schema|mysql|phpmyadmin)$';
The access permission to this file is set like this:
-rw-r--r-- 1 root root config.inc.php
I changed the ownership of this file to www-data:www-data without success. I am able to login as user phpmyadmin and edit the database via phpmyadmin, so the credentials should be ok. I created and inserted the user pma with no success.
In /var/lib/phpmyadmin/ there is another empty config.inc.php
-rw-r----- 1 root www-data 0 Jan 28 2014 config.inc.php
The problem is now, that when I login as the user with read access only, I am not able to browse any database. If I try I get the error:
#1142 - INSERT,DELETE command denied to user xxx for table 'pma__recent'
I have to give the user access to the db phpmyadmin to be able to read the database. Which I do not want to.
After giving access to phpmyadmin database I tried to at least hide the database. Without success.
I read the whole internet, I tried everything, I checked everything. Or apparently not.
Is there a way (log file, debug mode, whatever) to check if the config file and which config file is proceeded by phpmyadmin?
Does anybody find my mistake in this configuration?
Debian version is 7.11. Server version: 5.5.53-0+deb8u1 - (Debian) phpmyadmin version: 4.2.12deb2+deb8u2
Thanks,
Jaroslaw
Upvotes: 3
Views: 3334
Reputation: 31
But try to make these commands ... I also had the same problem:
chmod 644 /etc/phpMyAdmin/config.inc.php
chmod 755 /etc/phpMyAdmin/
Upvotes: 3