Drop MySQL databases via command line

October 22, 2015 — Leave a comment

Sometimes you’ll want to use the MySQL command line tool to drop a database..

Log into the database server and at the prompt type:
# mysql -u username -p

This tells mysql that you want to use the tool with permissions of ‘username’. The -p means that it will ask you for a password. Make sure that the user you want to use has permissions to drop that specific database…

Once you’re at the mysql prompt, let’s drop “test_database”

Ok – now just type “quit” to exit.




No Comments

Be the first to start the conversation.

Leave a Reply