Connect to the MYSQL database through 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 using 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 be created, please check the permission or something ");
----------------------------------------------------------------------------
Create a mysql table
$ Conn = mysql_connect ("localhost", "root", "password") or die ("unable to connect to database ");
Mysql_select_db ("webjx", $ conn) or die ("unable to connect to the database webjx ");
$ SQL = "create table webjx_table (
Ids integer not null auto_increment,
Primary key (ids)
)";
$ Mysql_query ($ SQL) or die (mysql_error ());