Re: ERROR 1010 (HY000): Error dropping database (can't rmdir ./foobar
Here is how I got out of it: # rm -f foobar/* (with server running! but not accessed by anyone, its a preprod slave ) mysql drop database foobar; mysql create database foobar; mysql source foobardump.sql I think it was a mismatch in the data dictionary between the database and its tables. The 'drop database' failed because the directory was not empty, and the drop table failed because the tables where not in the data dictionary. Everything started with a binary backup of ONE innodb database which uses ONE file per table. I think this is a problem with partial ,binary, backups that use innodb tables, since the data dictionary I think it's anyway the main tablespace (ibdata1 file) Q: Is that I am missing something ot it is a tricky situation? Hope this is helping other people as well Cheers Claudio Johan De Meersman wrote: * check on your filesystem if the directory actually still exists - rmdir on a nonexisting dir might throw a non-zero exit * Take your db offline and do an fsck. If you want, you could flush tables with read lock, then mount -oremount,ro and then fsck - that'll keep your db up for reads, at least. DON'T let fsck fix things that way, though - for that you really do need to shut down the db and unmount the disk. On Fri, Jan 30, 2009 at 7:29 PM, Claudio Nanni claudio.na...@gmail.com mailto:claudio.na...@gmail.com wrote: I am banging my head. First, is not a file permission problem. I cant import data on some replication slaves either in binary, or from a sql mysqldump. I use one innodb file per table and I am importing only two databases on a dozen. After a few hours seem that the problem is with the name of the database, since I can import on a different database/directory. I tried to import only the DDL(from the master where the dump comes from) to recreate all the tables to 'refresh' the information schema, then stop the DB, copy the .ibd datafiles in the directory, start the DB, and if I do a DESC dummy get: --- ERROR 1146 (42S02): Table 'foobar.dummy' doesn't exist --- If I drop the database I get the error in the subject --- ERROR 1010 (HY000): Error dropping database (can't rmdir ./foobar --- If I try to import from the SQL dump: --- ERROR 1005 (HY000) at line 23: Can't create table './foobar/dummy.frm' (errno: -1) --- I am stuck, any help really really aprreciated! Cheers Claudio -- Celsius is based on water temperature. Fahrenheit is based on alcohol temperature. Ergo, Fahrenheit is better than Celsius. QED. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
ERROR 1010 (HY000): Error dropping database (can't rmdir ./foobar
I am banging my head. First, is not a file permission problem. I cant import data on some replication slaves either in binary, or from a sql mysqldump. I use one innodb file per table and I am importing only two databases on a dozen. After a few hours seem that the problem is with the name of the database, since I can import on a different database/directory. I tried to import only the DDL(from the master where the dump comes from) to recreate all the tables to 'refresh' the information schema, then stop the DB, copy the .ibd datafiles in the directory, start the DB, and if I do a DESC dummy get: --- ERROR 1146 (42S02): Table 'foobar.dummy' doesn't exist --- If I drop the database I get the error in the subject --- ERROR 1010 (HY000): Error dropping database (can't rmdir ./foobar --- If I try to import from the SQL dump: --- ERROR 1005 (HY000) at line 23: Can't create table './foobar/dummy.frm' (errno: -1) --- I am stuck, any help really really aprreciated! Cheers Claudio
Re: ERROR 1010 (HY000): Error dropping database (can't rmdir ./foobar
* check on your filesystem if the directory actually still exists - rmdir on a nonexisting dir might throw a non-zero exit * Take your db offline and do an fsck. If you want, you could flush tables with read lock, then mount -oremount,ro and then fsck - that'll keep your db up for reads, at least. DON'T let fsck fix things that way, though - for that you really do need to shut down the db and unmount the disk. On Fri, Jan 30, 2009 at 7:29 PM, Claudio Nanni claudio.na...@gmail.comwrote: I am banging my head. First, is not a file permission problem. I cant import data on some replication slaves either in binary, or from a sql mysqldump. I use one innodb file per table and I am importing only two databases on a dozen. After a few hours seem that the problem is with the name of the database, since I can import on a different database/directory. I tried to import only the DDL(from the master where the dump comes from) to recreate all the tables to 'refresh' the information schema, then stop the DB, copy the .ibd datafiles in the directory, start the DB, and if I do a DESC dummy get: --- ERROR 1146 (42S02): Table 'foobar.dummy' doesn't exist --- If I drop the database I get the error in the subject --- ERROR 1010 (HY000): Error dropping database (can't rmdir ./foobar --- If I try to import from the SQL dump: --- ERROR 1005 (HY000) at line 23: Can't create table './foobar/dummy.frm' (errno: -1) --- I am stuck, any help really really aprreciated! Cheers Claudio -- Celsius is based on water temperature. Fahrenheit is based on alcohol temperature. Ergo, Fahrenheit is better than Celsius. QED.
Re: ERROR 1010 (HY000): Error dropping database (can't rmdir ./foobar
Hi Johan, dirs and files exist (also chmodded to 777) the strange thing is that this behaviour is on more than one slave, I think it is a bug related to the Information Schema and to the fact I use innodb_file_per_table. Not being able to drop a database is definitely a bug, it seems that somewhere it's locked. Thanks, I continue investigating. C. PS: MySQL is 5.0.45 Johan De Meersman wrote: * check on your filesystem if the directory actually still exists - rmdir on a nonexisting dir might throw a non-zero exit * Take your db offline and do an fsck. If you want, you could flush tables with read lock, then mount -oremount,ro and then fsck - that'll keep your db up for reads, at least. DON'T let fsck fix things that way, though - for that you really do need to shut down the db and unmount the disk. On Fri, Jan 30, 2009 at 7:29 PM, Claudio Nanni claudio.na...@gmail.com mailto:claudio.na...@gmail.com wrote: I am banging my head. First, is not a file permission problem. I cant import data on some replication slaves either in binary, or from a sql mysqldump. I use one innodb file per table and I am importing only two databases on a dozen. After a few hours seem that the problem is with the name of the database, since I can import on a different database/directory. I tried to import only the DDL(from the master where the dump comes from) to recreate all the tables to 'refresh' the information schema, then stop the DB, copy the .ibd datafiles in the directory, start the DB, and if I do a DESC dummy get: --- ERROR 1146 (42S02): Table 'foobar.dummy' doesn't exist --- If I drop the database I get the error in the subject --- ERROR 1010 (HY000): Error dropping database (can't rmdir ./foobar --- If I try to import from the SQL dump: --- ERROR 1005 (HY000) at line 23: Can't create table './foobar/dummy.frm' (errno: -1) --- I am stuck, any help really really aprreciated! Cheers Claudio -- Celsius is based on water temperature. Fahrenheit is based on alcohol temperature. Ergo, Fahrenheit is better than Celsius. QED. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org