Creating a new Blank Database in MySql

This post gives some information on how to create a new blank database on MySql.

  1. Open a commandline by either
    1. Pressing the ‘Windows key’ and the ‘r’ key together and type “cmd” and hit “ok”.
    2. Clicking the start menu and clicking the “Run…” option to the left of the menu and then typing “cmd” and clicking “OK”
  2. Navigate to the “C:\Program Files\MySQL\MySQL Server 5.1\bin” directory (this may depend on the version you are using. We want to MySql bin directory). You can do this by typing cd “C:\Program Files\MySQL\MySQL Server 5.1\bin” ensuring the quotes are around the path as there are spaces! You may be able to just type mysql if it is in the PATH variable, but here I’m assuming that it is not.
  3. Type “mysql -u root -p passwordhere where passwordhere is the root users password. The mysql commandline tool will come up.
  4. Type “CREATE DATABASE MediaWiki;” and press enter. (Note the ; at the end…. it is important!!!). Please replace MediaWiki with whatever yo want to call the database
  5. Type “quit;” and press enter. You can then close the commandline.

Your database has been created!


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: