phpMyAdmin
database error
troubleshooting
MySQL
technical issue

phpmyadmin.pma_table_uiprefs doesn't exist

Master System Design with Codemia

Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.

Introduction

The error phpmyadmin.pma_table_uiprefs doesn't exist means phpMyAdmin is configured to use its internal configuration-storage tables, but the required table is missing from the phpMyAdmin metadata database. This does not usually mean your application data is corrupted. It is normally a phpMyAdmin setup problem that affects saved UI preferences and other convenience features.

What pma_table_uiprefs Is For

phpMyAdmin can store extra metadata in special tables, often inside a database named phpmyadmin. One of those tables is pma_table_uiprefs, which stores user interface preferences for table views.

When phpMyAdmin is configured to use that metadata database but the table is missing, it logs warnings or shows errors when the related feature is accessed.

The Usual Cause

The most common causes are:

  • the phpMyAdmin configuration-storage tables were never created
  • the tables were created in a different database than the one configured in config.inc.php
  • an upgrade or migration copied phpMyAdmin files but not the metadata tables
  • the table was dropped accidentally

The fix is usually to create or recreate the configuration-storage schema.

Create the Missing phpMyAdmin Tables

phpMyAdmin ships with a SQL file for these internal tables. The file is commonly named create_tables.sql.

A typical recovery sequence is:

  1. create the metadata database if it does not exist
  2. import create_tables.sql
  3. verify that config.inc.php points to that database

Example SQL:

sql
CREATE DATABASE IF NOT EXISTS phpmyadmin;

Then import the bundled schema file with MySQL:

bash
mysql -u root -p phpmyadmin < create_tables.sql

After that, confirm the table exists:

sql
USE phpmyadmin;
SHOW TABLES LIKE 'pma_table_uiprefs';

Verify config.inc.php

Your phpMyAdmin configuration must point to the same metadata database that contains the pma_* tables.

php
1$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
2$cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';
3$cfg['Servers'][$i]['relation'] = 'pma__relation';
4$cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';

The exact table naming depends on the phpMyAdmin version. Newer installations commonly use names with a double underscore such as pma__table_uiprefs. If the config expects one naming style and the database contains another, the setup is inconsistent.

That version difference is worth checking before assuming the database is wrong.

Disable Configuration Storage If You Do Not Need It

If you do not care about saved UI preferences or advanced phpMyAdmin metadata features, another option is to remove or disable the related configuration entries. phpMyAdmin can still manage databases without those optional tables, but you lose the features backed by config storage.

That is a valid short-term workaround, though fixing the metadata schema is usually cleaner.

Check Permissions on the Metadata Database

Even when the table exists, phpMyAdmin still needs the configured control user to read and write the metadata tables correctly. If permissions are broken, the symptoms can look similar to a missing-table problem. Verify that the phpMyAdmin control user has access to the metadata schema before concluding that the installation SQL failed.

Common Pitfalls

  • Fixing the wrong database while config.inc.php points somewhere else.
  • Importing create_tables.sql into the wrong schema.
  • Ignoring phpMyAdmin version differences in table naming.
  • Assuming the error affects your application tables rather than phpMyAdmin's own metadata.
  • Copying phpMyAdmin to a new server without migrating the config-storage tables.

Summary

  • The error usually means phpMyAdmin's internal metadata table is missing or misconfigured.
  • Create or recreate the config-storage tables from create_tables.sql.
  • Verify that config.inc.php points to the correct metadata database.
  • Check for version-specific table names such as pma__table_uiprefs.
  • If necessary, disable config storage features until the metadata schema is fixed.

Course illustration
Course illustration

All Rights Reserved.