How to create a database

how to do it

1. Log in as the mysql root user. (Of course you have a password for root — right?!

$ mysql -u root -p

2. Create the database (Substitute "databasename" with the name you want for your database.)

mysql> create database databasename

3. Create at least one user for the database. (Substitute "databasename" with the name of your database, "databaseuser" with the name you want for your database user, and "userpassword" with the password you want for your user.)

mysql> grant all privileges on databasename.* 
     > to databaseuser@localhost 
     > identified by userpassword;

(Don't forget the .* and the @localhost ... like i always do!)

Note: Never write your scripts using root as the database user — unless you love hackers!

Know more

Everything about MySQL
RTFM! (Read The Fine Manual :)
General info:
www.tibetangeeks.com
Tech info for Tibetans