↑ ↓ select, Enter open, Esc close

Permanently delete a MySQL database

Adjust the values, the command updates live
root@server
mysql -e 'DROP DATABASE wp_old;'

Removes the given database completely, without any confirmation prompt. User accounts and their privileges remain and must be removed separately with DROP USER. Only run this after a verified backup.

Note: On Plesk servers, delete databases through Plesk so that the Plesk database and the interface stay consistent.

Also searched as

  • delete mysql database
  • drop database
  • remove old database

Related one-liners

All in MySQL and MariaDB

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.