Drop Database still displayed

[expired user #5330]'s profile image [expired user #5330] posted 13 years ago in General Permalink
Drop Database still displayed, and gives an error if clicked on.
A registry key needs to be edited to remove the database.
kalvaro's profile image kalvaro posted 13 years ago Permalink
You don't want the drop database feature available? :-?
[expired user #5330]'s profile image [expired user #5330] posted 13 years ago Permalink
Yes, I want to drop a database (provided it is the right one!).
However I do not want to have to modify the registry when I have.
kalvaro's profile image kalvaro posted 13 years ago Permalink
I'm not sure what registry you mean. MySQL does not use Windows registry to store data or permissions.

To drop a database from HeidiSQL, find its name on the tree in left panel, right click on it, select Drop... and confirm when prompted:

---------------------------
Confirm
---------------------------
Drop Database "foo"?
WARNING: You will lose all objects in database foo!
---------------------------
OK   Cancel   
---------------------------


However, it's important to note that your MySQL user needs to have appropriate permissions on the database you want to drop. In most shared hosting services, it's normally not the case.

[expired user #5330]'s profile image [expired user #5330] posted 13 years ago Permalink
I could not have encountered the bug in Heidi if I could not drop the database!
The Registry path is HKEY_CURRENT_USER/Software/HeidiSQL/Servers/MySqlServer/Databases.
The 6.0.0.3733 version of Heidi definitely reads this key. If it was a MYSQL bug I would report it somewhere else.
ansgar's profile image ansgar posted 13 years ago Permalink
I guess you had set the "databases" input field in the session manager, and HeidiSQL did not remove the dropped db in the running session. Further on I guess in the following session the database was gone. A bit cosmetic but I'll fix that.
ansgar's profile image ansgar posted 13 years ago Permalink
Oh I just see you must have added that deleted database to the list of wanted databases in the session manager, did you? This is the only case where HeidiSQL does not validate if that database really exists. You should just remove that item from the session settings. I was on the way to validate this list when I remembered there are server settings which do not allow to fire the SHOW DATABASES and maybe even not the fall back in information_schema. The wanted database list is especially for these users. If I now validate this list using the real list of dbs I would break that feature, so I'll better not do that. Just adjust your database list in the session please.
H.Lo's profile image H.Lo posted 1 year ago Permalink

This is still a bug in 2023. I delete a database and this database is not removed from tree view. When I click on it, I get an error. "Local databas" disconnect or app restart does not help.

ansgar's profile image ansgar posted 1 year ago Permalink

H.Lo please ensure you are using the latest release (v12.4 at this time). If this is still an issue with it, please post more details, e.g. what server type you are using, and probably a screenshot.

H.Lo's profile image H.Lo posted 1 year ago Permalink

Hi! Please see screenshots, I did it step by step. Because you have only 3 photos alloved per post, I'll have to make few posts in a row.

This one: screenshots 01, 02, 03

BR, Hrvoje

3 attachment(s):
  • 01-about
  • 02-local-database
  • 03-create-1st-database
H.Lo's profile image H.Lo posted 1 year ago Permalink

Screenshots 04,05, 06

3 attachment(s):
  • 04-1st-database
  • 05-1st-not-visible-after-create
  • 06-create-2nd-database
H.Lo's profile image H.Lo posted 1 year ago Permalink

Screenshots 07, 08, 09

3 attachment(s):
  • 07-only-1st-database-shows-up
  • 08-refresh
  • 09-both-databases-visible
H.Lo's profile image H.Lo posted 1 year ago Permalink

Screenshots 10, 11, 12

3 attachment(s):
  • 10-drop-1st-database
  • 11-1st-database-is-not-visible-after-drop
  • 12-refresh
H.Lo's profile image H.Lo posted 1 year ago Permalink

Screenshots 13, 14, 15

3 attachment(s):
  • 13-1st-database-shows-up
  • 14-still-remembered-in-registry-after-drop
  • 15-click-on-1st-raises-error
H.Lo's profile image H.Lo posted 1 year ago Permalink

Screenshots 16, 17

2 attachment(s):
  • 16-edit-registry-remove-1st
  • 17-restart-app-after-edit-registry-finally-1st-is-gone
H.Lo's profile image H.Lo posted 1 year ago Permalink

And now the steps because filenames of screenshots are not easily visible:

  1. You can see in about screen that I have almost latest version - at the time I wrote 1st post, that was latest version and now when I check for updates, there is one version after mine. But I guess this version of mine it's still pretty fresh version.

  2. You can see my local database

  3. Create the database named "1st"

  4. Entering the name of database in create popup

  5. After create process 1st database is not visible

  6. Then create one more database, let's name it "2nd"

  7. Not that 2nd database is created, 1st database shows up in tree view but 2nd database is still not visible

  8. Refresh "Local Database" tree view

  9. Now you can see both databases

  10. Drop 1st database

  11. 1st database is removed from tree view which is ok

  12. The click refresh again

  13. 1st database shows up no matter you dropped it a minute ago

  14. you can see registry entry where 1st database is still remembered

  15. if you click 1st database in tree view you get an error

  16. edit the registry in the way that you remove 1st database

  17. restart the app and finally 1st database is gone

H.Lo's profile image H.Lo posted 1 year ago Permalink

I hope this helps, I hope you got enough details to be able to reproduce behaviour.

BR, Hrvoje

H.Lo's profile image H.Lo posted 1 year ago Permalink

Oh, I forgot to mention the version of MySQL server:

$ ./mysql --version
C:\Program Files\MySQL\MySQL Server 8.0\bin\mysql.exe  Ver 8.0.16 for Win64 on x86_64 (MySQL Community Server - GPL)
ansgar's profile image ansgar posted 1 year ago Permalink

Please just clear the "Databases" setting in your session:

Description

H.Lo's profile image H.Lo posted 1 year ago Permalink

Ok, that's a bit easier than going to registry :)

Best regards, Hrvoje

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