I have a script that creates a backup of the production server database (mysql 5.1.66 RHEL) each night, and later in the morning the database is restored to my development computer (mysql 5.6.12 OSX 10.8.4)
the server mysqldump options are:
mysqldump --user=<username> --password=<secret> --opt --net_buffer_length=5000 --hex-blob --add-drop-database --databases [databasename] > file.sql
after copying file.sql to the development computer, the restoring code on the development machine is:
mysql -u<username> -p<secret> -h127.0.0.1 databasename < $sql
This script has worked well for a bit, but today I noticed error:
ERROR 1010 (HY000) at line 22: Error dropping database (can't rmdir './databasename', errno: 66)
I looked up the error code, and found it means = "object is remote", which is not particularly illuminating to me!
BTW I am dropping the database because previously I was getting an error with the INNODB table tablespaces which was:
ERROR 1813 (HY000) at line 25: Tablespace for table '`databasename`.`table`' exists. Please DISCARD the tablespace before IMPORT.
I have seen a post on this forum how to fix the error, but I more interested in understanding what happened so I can prevent it from recurring, as I have the automated script running each day.
Thanks in advance for reading.