Bug #77029 Drop database fails with 'Database doesn't exists' whereas it exists
Submitted: 13 May 2015 14:15 Modified: 14 May 2015 12:41
Reporter: Mayeul Rousselet Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Errors Severity:S2 (Serious)
Version:5.5.43-0+deb7u1-log, 5.6.24 OS:Linux
Assigned to: CPU Architecture:Any

[13 May 2015 14:15] Mayeul Rousselet
Description:
I have a master-slave replication setup.
I need to resynchronize my slave.
So I stop it via a "stop slave" and i want to delete the database before importing an updated dump (from the master) into it.
so i type (on the slave):
drop database radiooo_prod;
server answers me:
ERROR 1008 (HY000): Can't drop database 'radiooo_prod'; database doesn't exist

so i type:
create database radiooo_prod;

and the answer is....:
ERROR 1007 (HY000): Can't create database 'radiooo_prod'; database exists

Weird isn't it???

How to repeat:
Very hard to reproduce, i had a similar sync problem and I was able to drop the database.
[13 May 2015 14:24] Mayeul Rousselet
It was an issue of permissions on the directory /var/lib/mysql.
Error message should be more specific.

Thx anyway
[14 May 2015 12:41] Umesh Shastry
Hello!

Thank you for the report.
I agree, error message is misleading here.

Thanks,
Umesh