Create Mysql Database

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

Create Database using PHP Script:

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

Syntax :

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

Example :

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