3

How can I delete a database in Dbeaver? I set as default another db but still have an error.enter image description here

Griha Mikhailov
  • 655
  • 1
  • 9
  • 16

3 Answers3

2

Ok, it's not a bug. Just in your connection type another database. Now you can delete the previous default database.

Griha Mikhailov
  • 655
  • 1
  • 9
  • 16
0

The confusion arises because DBeaver automatically selects the configured database in the connection as the default. This selection prevents the database from being deleted within its own context.

There are two parts!

  1. You must need to enable "Show all databases" inside your connection properties. (Do not forget to terminate the connection first)
  2. You must need to have another database usually there is one with the username i.e postgres. Otherwise create a dummy.

Once you select any other DB from the menu it will allow delete the required one!

Ahsan.Amin
  • 736
  • 6
  • 14
-1

I just had this problem with DBeaver 7.1.0.

  1. Open your CLI terminal ;)

  2. Type mysql -u root -p (or whatever your SQL server is, Postgres, etc)

-u root is for user root

-p is for password--it will let you type it in after you hit enter

  1. Type USE databasename (where databasename is the name of your DB in DBeaver)

  2. Type SHOW tables; (this will list all the tables in that DB)

  3. Type DROP TABLE tablename; (where tablename is each table)

I searched for a while in DBeaver, but the easiest way is to simply use the MySQL command line interface and input a couple commands.

agm1984
  • 15,500
  • 6
  • 89
  • 113