Originally Posted by divinequran View Post

Is there is any option to create mysql data base automatically without using cpanel to create database, I use the following code but it does not create's Db on website.
mysql_query("CREATE DATABASE fig",$connection);

It creates DB in local but not in website?
I would recommend manually creation of databases. Then controlling them through php, and make sure the connection is right. You can use this script to connect to your database ( it is very simple but works )

PHP Code:
['host'] = 'host'// change to your host
$database['username'] = 'username'// change to username
$database['password'] = 'password'// change to password
$database['name'] = 'database'// change to database name

$db mysql_connect($database['host'], $database['username'], $database['password']) OR die ('Cant connect to the database');
mysql_select_db($database['name'], $db); // connection of database shouldn't be touched.