--Login---
C:\Program Files (x86)\MySQL\MySQL Server 5.6>mysql -u root -p
Enter password: **** //root
mysql> CREATE DATABASE db;
Query OK, 1 row affected (0.00 sec)
mysql> USE db;
Database changed
mysql> CREATE TABLE user_table(username varchar(25),password varchar(25),secureno int);
//check table ----------
--Login---
C:\Program Files (x86)\MySQL\MySQL Server 5.6>mysql -u root -p
Enter password: **** //root
//pointing db
mysql> USE db;
desc user_table;
///---Result-------
+----------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------+-------------+------+-----+---------+-------+
| username | varchar(25) | YES | | NULL | |
| password | varchar(25) | YES | | NULL | |
| secureno | int(11) | YES | | NULL | |
+----------+-------------+------+-----+---------+-------+
3 rows in set (0.01 sec)
//to know prot no
mysql> show variables; //3306
//---------Imp--------- not used this resource to new forum site ,collected from
http://bigknol.com/open-blog/2013/07/eclipse-jee-development-tutorial/
,add mysql env variable screen shot also--------------------imp-------//
- Prerequisite for JSP/MySQL Application with Eclipse JEE Kepler.
- Download and Install MySQL Server 5.5 on your Windows Machine
- Install Tomcat Server6.0( 32-bit windows zip)
- Download MySQL Connector/j for connecting JSP to MySQL Server.(mysql-connector-java-5.1.25.zip, Platform Independent (Architecture Independent))
- Download Eclipse IDE for Java EE Developers 32 bit windows And unzip it
JSP MySQL Eclipse JEE Development Kepler Tutorial
Creating a database and Table using MySQL : Open cmd prompt (Windows+R and Type ‘cmd’) or use MySQL 5.5 Command line client. Change directory to MySQL Server 5.5 installed Path. (In this example path looks like : C:\mysql\MySQL Server 5.5\bin>)Create a new user in MYSQL SeverYou can use root if you have super user privilege, or create a new user in MySQL, to create a new user:Login as a new usermysql –u nikisurf -pCreate a new Database db and Selecting DatabaseCreate a new Table in MySQL called ‘info’Open EclipseClick eclipse.exe file from unzipped folder and set a workspace(location of projects)Create a new Dynamic Web ProjectFile => New => Dynamic Web Project, and give Project name as ‘Info’ click Nextagain Next Finish.Connect MySQL to JSP with Eclipse KeplerAdd Library : MySQL Connector/jUnzip mysql-connector-java-5.1 and select mysql-connector-java-5.1.23-bin.jar file and drag and drop into the Project explorer of the Eclipse(info => WebContent => WEB-INF => lib).Start CodingRight Click on Info from Project Explorer => New => HTML File (Give Name as index.html)index.htmlCreate a new JSP file : Right Click on Info from Project Explorer => New => JSP File (Give Name as add.jsp) Insert the codes between body tag of the documentadd.jspCreate delete.htmldelete.jspshow.htmlshow.jspRun JEE Eclipse Info ProjectTo run tomcat server with Eclipse : Right Click on Info from Project Explorer =>Run as => Run on Server