How To Connect JSP With MYSQL Database

  Connection of  JSP With  MYSQL Database:

This article will shown the steps to connect to your application to database MYSQL.

  1. First of all Install  the XAMPP Server  with link available  according to your system version for Linux, Solaris, Windows, and Mac OS X,here:  https://sourceforge.net/projects/xampp/
  2. XAMPP Server   package  contains  Apache Tomcat web server,PHP ,MYSQL and phpMyAdmin.
  3. Install Netbeans IDE with the link available: https://netbeans.org/downloads/.
  4. Create a Database in MYSQL already embedded in XAMPP server .

Installation steps of XAMPP





  After this Click on Admin to create database in XAMPP 
  1. Select Register MYSQL Server under Databases by clicking on Services tab  :   
  •  Right click on Database and select  Register MYSQL  Server  
  • Click on Admin Properties :c:\xampp\mysql\bin\mysqladmin.exe\
  • Path to Start command:c:\xampp\mysql\bin\mysqld.exe\
  • Path to Stop command:c:\xampp\mysql\bin\mysqladmin.exe\
  • argument:  - u root stop
  • Click OK.
Right Click on MYSQL Server  ->Select Connect:
    1. After the creation of database in MYSQL  XAMPP server,then click refresh on MYSQL Services   in NetBeans IDE.
    2. Right click on mydb(database name you have created in MYSQL) and select connect. 
    3. Now you can see that the database has been successfully added here. 
    4. Now the databse is ready  to use for web application. 
In NetBeans IDE do the following steps to create a project

 Click on New File->Java Web ->Web Application->Project Name->Select Server Tomcat->OK

Right click on Web Application->New ->JSP file->


After this next steps will be updated soon





















Comments