- Start the MySQL server by issuing the command mysqld-shareware --standalone at the prompt in c:/mysql/bin. Refer the previous session Installing MySQL on Windows for further details.
- Now invoke the mysql client program by typing mysql at the prompt.
- The prompt is changed to a mysql> prompt. Type:
create database employees;
(Note: The command ends with a semi-colon). - The MySQL server responds with something like:
Query OK, 1 row affected (0.00 sec)
- This means that you have sucessfully created the database. Now, let's see how many databases you have on your system. Issue the following command.
show databases;
The server responds with the list of databases.
+----------------+ | Database | +----------------+ | employees | | mysql | | test | +----------------+ 3 rows in set (0.00 sec)
Here we have three databases, two created by MySQL during installation and our employees database. - To come back to the DOS prompt, type quit at the mysql prompt.
http://www.webdevelopersnotes.com/tutorials/sql/mysql_primer_creating_a_database.php3