InnoDB and MyISAM generating Table already exists error

3

I'm reshaping some screens of my system that entirely uses MyISAM as the MySQL Engine. In this case, these screens will use InnoDB post reformulation.

Exclude, by PHPMyAdmin, all the MyISAM tables in question and hitherto perfect, there were no problems. However, when trying to create the new InnoDB tables (with the same name) the following message appears:

  

Table already exists

What to do?

Example:

    
asked by anonymous 06.05.2014 / 13:18

2 answers

3

Discover the folder where the database files are located and remove them:

Select @@datadir

Access the folder returned by select from the corresponding database and delete the .MYD, .FRM, and MYI files. Remember that you need to turn off the mysql service for this task. Finally run a SHOW TABLES and try to re-create the tables.

Based on: location of database tables mysql windows xp

related: schrodinger mysql table

    
06.05.2014 / 13:52
2

The solution follows for anyone who might have the same problem. If someone else has a more practical solution, please do not stop posting (I had tested several solutions on the Internet that did not work).

Criar no BD original, as tabelas que ainda não existem mas com a engine como MyISAM.
Criar um novo BD com todas as tabelas desejadas com engine InnoDB.
Desligar MySQL.
Remover os arquivos das tabelas do BD original.
Copiar os arquivos das tabelas do novo BD para o BD original.
Definir mysql.mysql como proprietário dos arquivos das tabelas copiadas no BD original.
Conceder permissão 755 para os mesmos arquivos.
Iniciar o MySQL.

I read something about being a dictionary error. : -)

    
06.05.2014 / 21:03