Websitetemplate.org

Welcome > MySQL > MySQL: Set Up a Database

MySQL: Set Up a Database

$ mysqladmin -uROOT -pPASS create mydatabase
$ mysql
> grant all on mydatabase.* to myuser@localhost identified by "mypassw0rd";
> flush privileges;
> use mydatabase;
> CREATE TABLE table (
count int(10) unsigned NOT NULL auto_increment,
    contract varchar(5) NOT NULL default '',
    PRIMARY KEY (count),
    KEY contract_idx (contract)
) TYPE=MyISAM;

Content Copyright 2003-2014 George Toft