Error importing databases in mysql: ERROR 1005 (HY000) (errno:-1)
Hello everyone
I have a MySQL server (5.5.35) in debian wheezy. I have to import 12 databases from 12 dumps. The databases are identical except for their names (so are the dumps, of course), they have 108 tables and they are empty (i.e. I'm just importing the schema, actually).
The problem is that there is a point when the imports start to fail with this error:
ERROR 1005 (HY000): Can't create table 'databasename.tablename' (errno: -1)
Query OK, 0 rows affected (0.00 sec)
The most interesting thing is that it fails in a certain point, no matter which database I am importing: suppose that the databases are named from 1 to 12. The first 6 will be imported correctly, but when importing the seventh, it will eventually fail every time it tries to create a table with the afromentioned error. From this point, the rest of the imports will fail the same way. After removing everything and trying to import everything again, but in a different order (from 12 to 1), the databases 6-12 will be correctly imported, but the DB 5 will fail with the same error.
The fact that is failing in a certain point no matter what I'm trying to do suggest that I have reached some kind of limit. The only limit I know in MySQL is open_files_limit, which right now is set to 65535 (the maximum IIRC). The limits of the OS shown in the limits.conf show reasonable values.
I have tried importing the same SQL dumps into another similar server (in my own computer, with MariaDB-5.5.37), and I had success. I have quickly checked the variables and parameters of both SQL servers, and while they are not identical, I haven't found anything suspicious.
I am completly lost. I don't have the slightest idea where is the problem. Clearly is not in the sql dumps, since it would have failed for every DB. I don't know if it's a problem in the mysql configuration, the OS, or what.
Any help will be greatly appreciated.