Friday, February 15, 2013

Create a Database in MySQL

Create a Database in MySQL

 Creating  a Simple Database :

Syntax:
   Create Database [dbname]:

         Create Database HR;


Show Databases command Shows list of Databases Installed in the MySQL Server.

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| hr                 |
| joomla25102012     |
| magento            |
| mysql              |
| test               |
| wordpress          |
| zencart            |
+--------------------+
8 rows in set (0.01 sec)


Connect to Database/Connect to HR Database

mysql>use HR;

Database changed

Show all tables in the Database(HR)
 
mysql>Show Tables;
 
Empty set (0.00 sec)



Tags:Create Database in MySQL,
 Creating  a Simple Database in MySQL,List databases Installed in Mysql,Show databases Installed in Mysql, Connect to database, Show Tables in MySql,display Tables in Mysql,Display databases in MySQL,Create a Database in MySQL,Show all tables in the database

No comments:

Post a Comment