3.1.2 - Create Database

Top  Previous  Next

 

Create a new database

 

You need to have proper privileges in accessing MySql, in our sample we connect to the local machine, localhost.

 

Create a new database called "db_speedcheck":

 

sc_stats_mysql_create_db

 

 

Create a new table

 

Next, run the following SQL:

(Copy-and-paste or locate sql_speedcheck_stats_my_sql.txt in the /documents directory of package)

 

CREATE TABLE `speedcheck_stats` (

`speedcheck_stats_id` int(11) NOT NULL auto_increment,

`date_time` datetime NOT NULL default '0000-00-00 00:00:00',

`ip_address` varchar(50) NOT NULL default '',

`transfer_type` int(11) NOT NULL default '0',

`transfer_size` int(11) NOT NULL default '0',

`time_taken` int(11) NOT NULL default '0',

`session_id` varchar(50) NOT NULL default '',

`custom_1` varchar(255) NOT NULL default '',

`custom_2` varchar(255) NOT NULL default '',

`custom_3` varchar(255) NOT NULL default '',

PRIMARY KEY  (`speedcheck_stats_id`)

) TYPE=MyISAM AUTO_INCREMENT=1;

 

 

 

sc_stats_mysql_create_table

 

Now, database setup is done