问题
In phpmyadmin, we can drop a specific database from operation tab and by hitting "DROP THE DATABASE (DROP)". But I need to drop a specific database using command prompt or terminal.
回答1:
Use mysqladmin like
mysqladmin -uroot -pyourpassword drop database_name
In this case User: root with password: yourpassword will delete database database_name
You will get a warning and have to verify it
回答2:
Have you tried this command?
DROP DATABASE databasename;
You can read more here: https://www.w3schools.com/sql/sql_drop_db.asp
回答3:
You can try this
DROP DATABASE database;
https://dev.mysql.com/doc/refman/5.7/en/drop-database.html
来源:https://stackoverflow.com/questions/59882070/command-for-dropping-a-specific-mysql-database