In this article, we will explain how to clear your MySQL database with the help of two different ways: SSH and phpMyAdmin.
First, we will use SSH to access the empty MySQL database:
- Log into your cPanel account as a “root user”.
- Search for the “Databases” section and click on the “MySQL Databases” option.
- The next step is to choose the database to drop in and then select the assigned “username”.
- Here you will find “Manage User Privileges”, be careful to choose the “Drop” and “Create” options.
- Now, connect to your hosting account with the help of SSH.
- Run the following “Command”.
mysql -uUsername -pPassword - Run this command line on Shell “mysql -uABC -,GIuHYHTN6@Q”
- Execute this command to remove the database:
drop database database_name
That’s it! Now, here we will go with the second method which is phpMyAdmin
Follow the below steps to empty a database: Using phpMyAdmin
- Log into your cPanel account as “root users”.
- Search for the “Databases” section and click on the “phpMyAdmin”.
- A list of all the database tables will be available.
- Choose all tables by clicking on the “Check All” Option, then select the “Drop” menu:
- Confirm your decision to move on by selecting “Yes”.
In this way, you can use SSH and phpMyAdmin to empty your database. I hope you understood this article. For more details, please visit our KB section.