In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the method of deleting database by MySQL, which is very detailed and has certain reference value. Friends who are interested must finish reading it.
MySQL delete database method: 1, use drop command to delete database, code is [drop database;]; 2, use PHP script to delete, code is [mysqli_query (connection,query,resultmode);].
MySQL method to delete the database:
1. Drop command to delete database
Drop command format:
Drop database
For example, delete a database named RUNOOB:
Mysql > drop database RUNOOB
2. Delete the database using mysqladmin
You can also use the mysql mysqladmin command to execute the delete command on the terminal.
The following example deletes the database RUNOOB (which was created in the previous section):
[root@host] # mysqladmin-u root-p drop RUNOOBEnter password:*
After executing the above delete database command, a prompt box appears to confirm that the database is actually deleted:
Dropping the database is potentially a very bad thing to do.Any data stored in the database will be destroyed.Do you really want to drop the 'RUNOOB' database [yhampN] yDatabase "RUNOOB" dropped
3. Delete the database using PHP script
PHP uses the mysqli_query function to create or delete an MySQL database.
This function takes two arguments and returns TRUE on successful execution, or FALSE otherwise.
Grammar
Mysqli_query (connection,query,resultmode)
Example
The following example demonstrates the use of the PHP mysqli_query function to delete a database:
Delete database
The above are all the contents of MySQL's method of deleting the database. Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
Welcome to step on my official account.
© 2024 shulou.com SLNews company. All rights reserved.