Dùng mysqladmin drop để xóa database (cần quyền đặc biệt).
Cú pháp
[root@host]# mysqladmin -u root -p drop db_name Enter password:******
Ví dụ: Xóa database TUTORIALS
[root@host]# mysqladmin -u root -p drop TUTORIALS Enter password:****** Dropping the database is potentially a very bad thing to do. Any data stored in the database will be destroyed. Do you really want to drop the 'TUTORIALS' database [y/N] y Database "TUTORIALS" dropped
Lưu ý:
- Hệ thống yêu cầu xác nhận (y/N) trước khi xóa
- Hành động không thể hoàn tác – dữ liệu mất vĩnh viễn
- Cần quyền DROP privilege
- Tương đương SQL:
DROP DATABASE db_name;