Error: #1146 – Table ‘phpmyadmin.pma_table_uiprefs’ doesn’t exist mysql
Just upgrade my ubuntu 14 to 15. all looks good then i go to my localhost phpmyadmin and tried to open database then found a strange error like mysql said: #1146 – Table ‘phpmyadmin.pma_table_uiprefs’ doesn’t exist mysql. Then searched for fix on google and found many of good answers to fix so i am sharing a simple solution what i have done to fix this error #1146 – Table ‘phpmyadmin.pma_table_uiprefs’ doesn’t exist mysql. This error is because phpMyAdmin configuration storage tables name does not match the actual table name.
How to fix #1146 – Table ‘phpmyadmin.pma_table_uiprefs’ doesn’t exist mysql
Go to “/etc/phpmyadmin/config.inc.php” open it your favorite editor and search for below code
$cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';
replace it with below code
$cfg['Servers'][$i]['table__uiprefs'] = 'pma__table_uiprefs';
or(incase above not worked)
$cfg['Servers'][$i]['pma__table_uiprefs'] = 'pma__table_uiprefs';
Now after save and run your phpmyadmin databse and tables you will not seeing any Error like : #1146 – Table ‘phpmyadmin.pma_table_uiprefs’ doesn’t exist mysql.
After fix this when i go for open tables i faced again another error like Could not save recent table! #1146 – Table ‘phpmyadmin.pma_recent’ doesn’t exist. this is also the same reason.
How to fix #1146 – Table ‘phpmyadmin.pma_recent’ doesn’t exist
Looks like some other configuration tables not matching so i replaced whole code like
Go to “/etc/phpmyadmin/config.inc.php” open it your favorite editor and search for below code
$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';
And replace it with below code :-
$cfg['Servers'][$i]['pma__bookmarktable'] = 'pma__bookmark';
$cfg['Servers'][$i]['pma__relation'] = 'pma__relation';
$cfg['Servers'][$i]['pma__table_info'] = 'pma__table_info';
$cfg['Servers'][$i]['pma__table_coords'] = 'pma__table_coords';
$cfg['Servers'][$i]['pma__pdf_pages'] = 'pma__pdf_pages';
$cfg['Servers'][$i]['pma__column_info'] = 'pma__column_info';
$cfg['Servers'][$i]['pma__history'] = 'pma__history';
$cfg['Servers'][$i]['pma__table_uiprefs'] = 'pma__table_uiprefs';
$cfg['Servers'][$i]['pma__designer_coords'] = 'pma__designer_coords';
$cfg['Servers'][$i]['pma__tracking'] = 'pma__tracking';
$cfg['Servers'][$i]['pma__userconfig'] = 'pma__userconfig';
$cfg['Servers'][$i]['pma__recent'] = 'pma__recent';
Also if you want to reconfigure your phpmyadmin for fix those errors you can simple run below command via terminal.
sudo dpkg-reconfigure phpmyadmin
Now you can run smoothly your phpmyadmin with any error after replace with above code you have changed all tables with match name. so phpmyadmin will be run correctly.