Imported tables are not showing up in phpmyadmin

I have imported a .sql file as you did and then I went to phpmyadmin, selected the database and surprise: No tables in the database, but I went to mysql command line and did a SHOW TABLES and they do exist.

So this is what happened in my case, the original database had some VIEWS defined by a user that did not exist in my computer’s mysql users.
Example:

CREATE ALGORITHM=UNDEFINED DEFINER=admin@% SQL SECURITY DEFINER VIEW cantidades AS select (…)

The user phongtn@% was available on the original server from where I’ve exported the database, but not on my computer.

So the fix to this solution was either to add that user, or to drop the views and create them again with a existing user.I have choosen the second option:

DROP VIEW cantidades;
CREATE ALGORITHM=UNDEFINED DEFINER=root@localhost SQL SECURITY DEFINER VIEW cantidades AS select (…)

Advertisements