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.
Now, you can create table using the following command :
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)
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.