In this section we will create database and table into MySQL database.
Ads
TutorialsIn 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)
) ;
Posted on: May 22, 2009 If you enjoyed this post then why not add us on Google+? Add us to your Circles
Advertisements
Ads
Ads
Discuss: Setup MySQL Database View All Comments
Post your Comment