Online Training Spring Hibernate Training in Delhi R Programming Training Course Big Data and Hadoop Training Java Training

Setup MySQL Database

In this section we will create database and table into MySQL database.

Ads

Setup MySQL Database

        

In this section we will create database and table into MySQL database. Table created here will be used in sample application.

Downloading and Installing MySQL

You can download MySQL from mysql.org. Read more on downloading and installing mysql at http://www.roseindia.net/mysql/mysql5/Installing-MySQL-on-Windows.shtml

Creating Database :

You can create mysql database by issuing the following command:

>mysql>create database jsf_hibenate;

Creating Table :

To create table in this database you would have to first select the database by use statement.

mysql>use jsf_hibenate

Now, you can create table using the following command :

mysql>create table users ( 
userId int(11) NOT NULL auto_increment, 
userName varchar(20) default NULL, 
userPassword varchar(11) default NULL, 
userEmail varchar(30) default NULL, 
userAddress varchar(30) default NULL, 
PRIMARY KEY (userId) 
) ;

Advertisements

Ads
Share on Google+Share on Google+

Setup MySQL Database

Posted on: May 22, 2009 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Advertisements

 

Discuss: Setup MySQL Database   View All Comments

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:0

Ads

 

Ads