I have a database called apsc , and if I run SHOW TABLES; on it SHOW TABLES; , these will be the following results:
mysql> show tables; +------------------------------------+ | Tables_in_apsc | +------------------------------------+ | aps_application | | aps_application_backup | | aps_application_resource | | aps_package | | aps_package_configuration | | aps_package_global_setting | | aps_package_resource_configuration | | aps_package_resource_setting | | aps_package_series | | aps_package_service | | aps_registry_object | | aps_registry_object_setting | | aps_registry_object_tag | | aps_resource | | aps_resource_backup | | aps_resource_requirement | | aps_resource_requirement_backup | | aps_settings_sequenses | +------------------------------------+ 18 rows in set (0.00 sec)
However, if I run SELECT * FROM aps_application , I get the following:
mysql> SELECT * FROM aps_application; ERROR 1146 (42S02): Table 'apsc.aps_application' doesn't exist
There is a bunch of .frm files in my /var/lib/mysql/apsc/ directory, which makes me think these tables are InnoDB. However, if they were just damaged or missing in the data / log files in /var/lib/mysql/apsc/ibdata1 , they should appear as table in use and what not, since I had this problem with other tables recently InnoDB.
I believe these tables are part of Plesk, because at some point I was rewriting database files and getting errors about the missing aps_application view. Plesk is now working fine, so I doubt the table is corrupted.
In addition, SHOW CREATE TABLE aps_application and SHOW CREATE VIEW aps_application run with the same error as the selection.
Edit: I am logged in as root with full permissions. To test this, I switched tables and SELECT worked like a charm. In addition, if I am in phpMyAdmin and select this database, it displays 0 tables, if I did not start SHOW TABLES; on the SQL tab;
source share