Reputation: 333
Having a problem opening any of my databases in phpMyadmin I tried deleting a lot of old, irrelevant databases and may have in the process deleted something I shouldn't have and was wondering what I could do to resolve the error
#1146 - Table 'phpmyadmin.pma__tracking' doesn't exist
Upvotes: 20
Views: 93704
Reputation: 870
I had this issue when I switched from mysql
to maraidb
. The solution was to do the following, run the create tables script from the console.
Get to the terminal
$ mysql -uroot -padmin
Then import the create phpmyadmin
db and tables script, I got it from Oldskool's answer above. (READ it before running it)
MariaDB [(none)]> source create_tables_phpmyadmin.sql;
Query OK, 1 row affected (0.00 sec)
Database changed
Query OK, 0 rows affected (0.02 sec)
...
In case of exists
error you may clear your previous phpmyadmin
db that you had tried adding.
Upvotes: 0
Reputation: 31
I had this problem after installed XAMPP. I did the following:
- In
/opt/lampp/bin1
use./mysql_upgrade -u root
with option-p
if you use a password.- In
/opt/lampp/var/mysql/phpmyadmin
rm
all*.ibd
files.- Import create_tables.sql in phpMyAdmin GUI or run it in console.
Upvotes: 3
Reputation: 513
Had similar problem.
I created pma__ tables in my project db by clicking something in operations tab of that db.
Then I deleted my db, created new with the same name and got "table does not exist" problem.
Fixed it by executing modified sql/create_table.sql on my db. Had to delete phpmyadmin db creation and use from there.
Upvotes: 1
Reputation: 34867
All the phpMyAdmin tables are defined in the SQL dump that comes with the package in sql/create_tables.sql. You can import that file in it's entirety (will also re-create any other tables you might have dropped) or just create the missing table by running this query:
CREATE TABLE IF NOT EXISTS `pma__tracking` (
`db_name` varchar(64) NOT NULL,
`table_name` varchar(64) NOT NULL,
`version` int(10) unsigned NOT NULL,
`date_created` datetime NOT NULL,
`date_updated` datetime NOT NULL,
`schema_snapshot` text NOT NULL,
`schema_sql` text,
`data_sql` longtext,
`tracking` set('UPDATE','REPLACE','INSERT','DELETE','TRUNCATE','CREATE DATABASE','ALTER DATABASE','DROP DATABASE','CREATE TABLE','ALTER TABLE','RENAME TABLE','DROP TABLE','CREATE INDEX','DROP INDEX','CREATE VIEW','ALTER VIEW','DROP VIEW') default NULL,
`tracking_active` int(1) unsigned NOT NULL default '1',
PRIMARY KEY (`db_name`,`table_name`,`version`)
)
COMMENT='Database changes tracking for phpMyAdmin'
DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
Switch to the phpmyadmin database. You can then use the "SQL" tab to execute this query directly on the database.
Upvotes: 30