You would need special privilege to create or to delete a MySQL database. So
assuming you have access to root user, you can create any database using mysql
mysqladmin binary.
A D V E R T I S E M E N T
Be careful while deleting any database because it will lose your all the data
available in your database.
Here is an example to delete a database created in previous chapter:
[root@host]# mysqladmin -u root -p drop TUTORIALS
Enter password:******
This will give you a warning and it will confirm if you really want to delete
this database or not.
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 'TUTORIALS' database [y/N] y
Database "TUTORIALS" dropped
Drop Database using PHP Script:
PHP uses mysql_query function to create or delete a MySQL database.
This function takes two parameters and returns TRUE on success or FALSE on
failure.
Syntax:
bool mysql_query( sql, connection );
Parameter
Description
sql
Required - SQL query to create or delete a MySQL database
connection
Optional - if not specified then last opened connection by
mysql_connect will be used.
Share And Enjoy:These icons link to social bookmarking sites where readers can share and discover new web pages.
Keywords:
MySQL Drop Database, Mysql Tutorial, Mysql tutorial pdf, history of mysql, basic mysql, syntax use in mysql, mysql software download, learn mysql, mysql insert, mysql delete, mysql data types, mysql administrator.