MySQL: Create Database

mysqladmin -uROOTUSER -pROOTPASS create DATABASE
mysql -uROOTUSER -pROOTPASS -e 'grant all on DATABASE.* to USERNAME@localhost identified by "PASSWORD"'



$ mysqladmin -uROOT -pPASS create mydatabase
$ mysql
> grant all on mydatabase.* to mylogin@localhost identified by "mypassw0rd";
> 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)
> flush privileges