1

Working with MySQL 5.7 and after a power outage everything seems ok. Then I must rename a table. So, easy-peasy:

RENAME TABLE MYTABLE TO MY_REAL_TABLE

>Table MY_REAL_TABLE already exists.

So I try to drop the mentioned table:

DROP TABLE MY_REAL_TABLE

>Table MY_REAL_TABLE does not exists.

Why??????

All commands are on same CLI so, no confusion about server is possible. I'm using same database for both commands. Checked if data directory contained table files. Non existent.

The information_schema.tables has no row for MY_REAL_TABLE.

I am stuck as I can do nothing regarded to this table and I need it renamed.

informatik01
  • 16,038
  • 10
  • 74
  • 104
Forge
  • 1,587
  • 1
  • 15
  • 36
  • Those is a great contradictory error messages right there.. You sure you are connected to the correct MySQL Server, Used the correct database with `USE database_name` ? Did you try closing the IDE completly and reconnect ? – Raymond Nijland Nov 04 '19 at 14:23
  • .. Did you check in `information_schema.tables` if the table really exists? If not not there did you check the MySQL data directory/database_name if a MY_REAL_TABLE file is there? – Raymond Nijland Nov 04 '19 at 14:25
  • Also check if those tables are not corrupted now... if all does not help i fear you need to reinstall your MySQL or install a new one besides it running on a other port, as it looks like your MySQL installation is somehow corrupted – Raymond Nijland Nov 04 '19 at 14:27
  • 2
    .. also this question is more suiteable for https://dba.stackexchange.com/ but you will also need to add more information most likely to get answers there.. – Raymond Nijland Nov 04 '19 at 14:31
  • yep, connected to the same database and server (i write commands on the same CLI). Tried rebooting mysql service and the machine to no avail. Table files are not available in data directory. – Forge Nov 04 '19 at 14:54
  • information_schema.tables has no trace of MY_REAL_TABLE – Forge Nov 04 '19 at 14:56
  • i voteclosed to question to be offtopic here, as it should be better suitable for https://dba.stackexchange.com/ , i believe this question gets automatically moved when enough people votevote this also for this reason.. – Raymond Nijland Nov 04 '19 at 15:00

0 Answers0