www.Tutorialsforu.info

Free Tutorials Cave

  • Increase font size
  • Default font size
  • Decrease font size
Your Ad Here



Create New MySQL Database

E-mail Print
Current revision posted to MySQL Tutorials by admin on 12/19/2008 7:22:08 PM

You need to use mysqladmin to create MySQL database. The command is simple just write mysqladmin in a dos window followed by the database name you want to create

C:>mysqladmin create petstore

C:>mysql
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 3 to server version: 4.0.18-nt

Type 'help;' or 'h' for help. Type 'c' to clear the buffer.

mysql> SHOW databases;
+----------+
| Database |
+----------+
| mysql    |
| petstore |
| test     |
+----------+
2 rows in set (0.00 sec)

mysql>

You can also type the query in mysql> prompt like this

mysql> CREATE database petstore;
Query OK, 1 row affected (0.00 sec)

To show available databases in mysql use the command show databases on mysql> prompt. Now use the database by typing USE petstore and then type SHOW tables to see what tables are available in the database

mysql> USE petstore;
Database changed
mysql> SHOW tables;
Empty set (0.00 sec)

Next I will show you how to create table in mysql database


Read Full Article
 

Subscribe By Email

Enter your email address:

Delivered by FeedBurner

Translate

Donate

Development & maintainance needs time & money.
With your donation you can help us to keep this project alive
Donate:
  Monthly Monthly
Currency
Amount