Drop Mysql Database

A database is a collection of  set of tables, views and set of data. If you want to drop mysql database you will need special privileges for drop/delete a MySQL database. so you will need root access of your mysql server.

Drop Database using PHP Script:

mysql_query function used for drop Mysql Database using php script. mysql_query function need two parameters for drop database and returns TRUE for success or FALSE for failure of query.

Syntax :

Input Parameter Detail
sql_statement Required – SQL query of drop MySQL database
connection_string Optional – if not set, then used last opened mysql connection.

Example :

Here show the basic php script example for drop mysql database. please try below example code and drop mysql database.