Blog Bustle 12/02/2020
Delete database mysql command is very fast process to delete database in mysql server. Remember that before deleting database, all information will lost stored in database.
Step 1: go inside mysql folder directory.
Step 2: go inside bin folder.
Step 3: Connect Mysql server. Enter user login command mysql -u [username] -p[password]
Step 4: Enter password
Step 5: write query "drop database database_name;" and hit enter
I am going to delete test_db database from delete database mysql command.
So these were the steps of delete database mysql command line.
combined statement of delete database mysql command with if database exists
DROP DATABASE IF EXISTS database_name;
We can manage all information by creating database in mysql server. Mysql uses Apache http web server. Apache web server is free open source web server software.
We create tables inside mysql database to store data and We use sql to write query in Mysql server.
We store all project information in mysql database so before deleting database remember that we should have database backup file.
If we delete database and we would not have database backup file then we will lose all database information stored in mysql server. We will not be able to retrieve that information so be careful before deleting database.
Before running delete database mysql command, we should also check that database, whom we want to drop, exists or not in mysql server. How can we know it? We have to run show databases like 'database_name'; command.