distal-attribute
distal-attribute
distal-attribute
distal-attribute

Database cannot be deleted -- SQL Error 1049: Unknown database

WaveLength posted 3 years ago in General
When I go to localhost, a database called test1 is listed in the left panel. I want to drop it, but when I click on it, I get this error message:

SQL Error (1049): Unknown database test1

If I run

drop database test1

then I get error 1008 ("database doesn't exist")

I have several of these fantom databases, and I'd like to delete them. Is there any way to do that?

Thanks.


ansgar posted 3 years ago
Do these databases show up in a SHOW DATABASES query result?
WaveLength posted 3 years ago
No, they do not appear after a SHOW DATABASES query.
WaveLength posted 3 years ago
I solved the problem, as follows:

Open the Session Manager, select localhost, choose an individual database from the Databases drop-down list, click save, click cancel, exit HeidiSQL, reopen HeidiSQL, select localhost, click Open. The phantom databases are gone.
ansgar posted 3 years ago
Very strange. Where do you think did they appear from?

Dinand posted 2 months ago

thanx WaveLenght, after 3 years, it still is the same problem with the same solution.

ansgar posted 2 months ago

Can somebody please shed some light on where these phantom databases come from??

Dinand posted 2 months ago

Ansgar, The db's are your own old db's . So the check for existing db's should be done with the connect and the problem is solved. But while there is no report button.

WILL ANY ONE TAKE THIS TO THE ISSUE LIST THANX

ansgar posted 1 month ago

Ansgar, The db's are your own old db's

Please explain.

Please login to leave a reply, or register at first.