Unable to create InnoDB table (error -1)

I am transferring a fairly simple table to my live db server, and this gives me this strange error when I try to create an InnoDB table, creating a table:

CREATE TABLE `cobertura` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `cep` int(8) unsigned zerofill NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id` (`id`), KEY `idx_cep` (`cep`) ) ENGINE=InnoDB; 

If I changed the engine to MyISAM, it works, if I changed the table name to something else, it works. If I create a table as MyISAM and make a engine that changes InnoDB, I will get error 121. I tried to look at the folder where mysql stores the files to see if there is garbage there, nothing.

Any ideas?

+4
source share
1 answer

While the database may have a dash (-) in the name, it will not allow MariaDB (and therefore MySQL) to install the engine in InnoDB ... although this is at best a semi-answer while I try to import the entire database back there are other tables in the system that are created first without problems. Unfortunately, this problem is now being imposed on me, and I do not have time to start a new database name schema policy. At the moment, I am changing the mechanism of this particular database to use MyISAM.

From a common troubleshooting problem:

 SHOW ENGINES; 

... and if InnoDB is not installed, then try this:

 INSTALL PLUGIN innodb SONAME 'ha_innodb.so'; 
0
source

All Articles