If you are using phpMyAdmin, for several reasons we may need to delete database in sql. Deleting a database in phpMyAdmin is relatively easy and simple process and it needs only a of minutes delete a database in phpMyAdmin. To delete a database in phpMyAdmin, you may follow two steps: using sql command or deleting the database from graphical window. This page provides you all the ways, you can delete a database with phpMyAdmin.
Requirements to delete a database with phpMySQL:
- phpMyAdmin software installed Web space / web server
- database username and password with admin privileges
Methods to delete a database with phpMySQL
Two methods are available to delete a database with phpMySQL:
- using sql command
- deleting the database from graphical window
Delete a database with phpMySQL using sql command
You can delete a database with phpMySQL using sql command. The following command is used for deleting a database using SQL command:
DROP DATABASE database_name;
For example, we would like to delete a database named as mydb. So, the sql command to delete the database mydb is the following:
DROP DATABASE mydb;
/* here, mydb is the database name */
How to Delete an Entire Database With PhpMyAdmin from graphical window
Follow the following steps to delete an Entire Database With PhpMyAdmin from graphical window:
Step 1: Log in to the phpMyAdmin interface on your Web space using the username and password. Remember, you must need the admin privilege to delete the database. So, please log in with the account that has admin enabled username and password. Moreover, if you are using any web-hosting provider's server, please use the username and password assigned by your Web-hosting provider company.
Step 2: Choose / select the database that you would like to delete. To select the database, just click on the database name or choose the database form the drop down selection box on the left. Please be sure yourself that are selecting the desired database that you would like to delete.
Step 3: After selecting the database, you will find a Drop button of the far right corner of your window. Just click on the Drop button. Now, a confirmation messenger will be pop-up, informing you that You are about to DESTROY a complete database! Do you really want to DROP DATABASE [NAME]?" Here, [NAME] is the name of your database.
Step 4: Just click the OK button to delete the entire database and that's all
Thant's all. Following any of the above mentioned method, you can delete database in sql command or Delete database in graphically within phpMyAdmain
No comments:
Post a Comment
Thanks for your valuable feedback. Your feedback will be published soon.