For Debian Jessie, 8.6 w/ phpMyAdmin 4:4.2.12-2+deb8u2 here's how I solved this:
I know this is quite involved. Clearly there is something wrong with the installer but I don't know where to start to get it fixed. So this is a workaround for now. There appear to be lots of people having problems with this issue, and it appears that there are a variety of solutions that work under different versions.
0) As suggested in Debian setup notes here I did this first. It didn't fix the issue, but it may have helped. It re-asks you questions and the -p low parameter makes sure to ask all of them:
dpkg-reconfigure -plow phpmyadmin
It says "it creates a phpmyadmin database" (and it's tables), but it does not, so we'll create them manually below.
1) Run phpMyAdmin by entering this into your browser, (you need to have PHP enabled support in your webserver). You'll need the username and password for your MariaDB or MySQL server. Normally the username is root. For me the server is local, so my Server Choice is localhost:
http://localhost/phpmyadmin/
2) Unzip /usr/share/doc/phpmyadmin/examples/create_tables.sql.gz and extract the SQL. I had to use an editor to strip the comment lines starting with "--".
(( NOTE I think this archive might be temporarily corrupt as it gives an error when I try to manually unzip it. But you can use this trick to open it:
dd if=create_tables.sql.gz | gunzip -f
Also the GUI 'Open With Archive Manager' lets me open it.
3) Select the SQL tab, paste this sql from #2 into the SQL box, and click 'Go' to create the database and tables. (It's the missing SQL that's suppose to be in /etc/phpmyadmin/sql/create_tables.sql.)
4) Create the sql user named 'pma'. Open phpMyAdmin, Select Home | Users | Add user, and add a new user named 'pma' as follows:
User name: Use text field: pma
Host: Local: localhost
Password: Use text field: <enter a new password for user pma>
Global privileges (leave all boxes unchecked)
5) Give the pma user full access to the new phpmyadmin data base. Again select Home | Users | Edit Privileges for the pma user. Careful now... Select "Database" toward the top of the screen. Next to 'Add privileges on the following database:' select phpmyadmin. Then click the 'Check All' box, and click 'Go'.
NOTE: the Global privileges for pma should still be all unchecked!
6) Edit /etc/phpmyadmin/config-db.php and change the following lines:
$dbuser='pma';
$dbpass='<your pma user's password>';
7a) Uncomment the following lines in /etc/phpmyadmin/config.inc.php:
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
if (empty($dbserver)) $dbserver = 'localhost';
$cfg['Servers'][$i]['host'] = $dbserver;
if (!empty($dbport) || $dbserver != 'localhost') {
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['port'] = $dbport;
}
//$cfg['Servers'][$i]['compress'] = false;
/* Select mysqli if your server has it */
$cfg['Servers'][$i]['extension'] = 'mysqli';
/* Optional: User for advanced features */
$cfg['Servers'][$i]['controluser'] = $dbuser;
$cfg['Servers'][$i]['controlpass'] = $dbpass;
/* Optional: Advanced phpMyAdmin features */
$cfg['Servers'][$i]['pmadb'] = $dbname;
$cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';
$cfg['Servers'][$i]['relation'] = 'pma__relation';
$cfg['Servers'][$i]['table_info'] = 'pma__table_info';
$cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';
$cfg['Servers'][$i]['column_info'] = 'pma__column_info';
$cfg['Servers'][$i]['history'] = 'pma__history';
$cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';
$cfg['Servers'][$i]['tracking'] = 'pma__tracking';
$cfg['Servers'][$i]['designer_coords'] = 'pma__designer_coords';
$cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
$cfg['Servers'][$i]['recent'] = 'pma__recent';
$cfg['Servers'][$i]['favorite'] = 'pma__favorite';
$cfg['Servers'][$i]['users'] = 'pma__users';
$cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
$cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
$cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches';
7b) Also uncomment the following lines in /etc/phpmyadmin/config.inc.php, and change controluser to 'pma', and also add your password to line 3 below:
/* Optional: User for advanced features */
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = '<insert your password here>';
/* Storage database and tables */
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
$cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';
$cfg['Servers'][$i]['relation'] = 'pma__relation';
$cfg['Servers'][$i]['table_info'] = 'pma__table_info';
$cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';
$cfg['Servers'][$i]['column_info'] = 'pma__column_info';
$cfg['Servers'][$i]['history'] = 'pma__history';
$cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';
$cfg['Servers'][$i]['tracking'] = 'pma__tracking';
$cfg['Servers'][$i]['designer_coords'] = 'pma__designer_coords';
$cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
$cfg['Servers'][$i]['recent'] = 'pma__recent';
$cfg['Servers'][$i]['favorite'] = 'pma__favorite';
$cfg['Servers'][$i]['users'] = 'pma__users';
$cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
$cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
$cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches';
8) Then logout/login.
Note, on Debian the important directories are:
- /etc/phpmyadmin/ - your editable setup files
- /usr/share/phpmyadmin/libraries - includes a default setup file