phpmysqldatabasephpmyadmin

phpMyAdmin Not Showing Tables


I'm having a rather strange issue with phpMyAdmin at the moment, it seems to be allowing me to view my databases, but I can't view the tables that are contained within them unless I execute an individual select command from the command console. I can't seem to figure out what's going on. It's rather annoying as I don't want to have to execute an alter command every time I want to add a new column and such like. Does anybody know what's going on?


Solution

  • Had the same issue. But only after importing a dump in a newly created database. show tables via mysql.exe did list the tables. Cause was that the import file (or dump file) contained view definitions, like so:

    /*!50001 DROP TABLE IF EXISTS `view_myview`*/;
    /*!50001 DROP VIEW IF EXISTS `view_myview`*/;
    /*!50001 SET @saved_cs_client          = @@character_set_client */;
    /*!50001 SET @saved_cs_results         = @@character_set_results */;
    /*!50001 SET @saved_col_connection     = @@collation_connection */;
    /*!50001 SET character_set_client      = latin1 */;
    /*!50001 SET character_set_results     = latin1 */;
    /*!50001 SET collation_connection      = latin1_swedish_ci */;
    /*!50001 CREATE ALGORITHM=UNDEFINED */
    /*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */
    /*!50001 VIEW `view_myview` AS select `p`.`id` AS blabla */;
    /*!50001 SET character_set_client      = @saved_cs_client */;
    /*!50001 SET character_set_results     = @saved_cs_results */;
    /*!50001 SET collation_connection      = @saved_col_connection */;
    

    Removed the view definitions from the file, executed the import again and tables were displayed in phpMyAdmin. Views were lacking of course, but at the time I didn't need them. I think the true cause has to do with the DEFINER line:

     /*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */
    

    Same issue described here.