Connect MySQL database via PHP
$conn = mysql_connect ("localhost", "root", "password") or Die ("Unable to connect to database");
mysql_select_db ("table", $conn) or Die ("data source not found");
create a MySQL database from PHP
$conn = mysql_connect ("localhost", "root", "password") or Die ("Unable to connect to database");
mysql_create_db ("Webjx") or Die ("Unable to create database");
$SQLSTR = "CREATE Database OTHER_WEBJX";
mysql_query ($sqlstr) or Die ("Cannot create, general check permissions, etc.");
Create a table for MySQL
$conn = mysql_connect ("localhost", "root", "password") or Die ("Unable to connect to database");
mysql_select_db ("Webjx", $conn) or die ("Unable to connect to database Webjx");
$sql = "CREATE Table webjx_table (
IDS integer NOT NULL auto_increment,
Primary KEY (IDS)
)";
$mysql _query ($sql) or Die (Mysql_error ());
Create a database creation table by connecting MySQL database with PHP