Upload
abhishek-saha
View
2
Download
0
Embed Size (px)
Citation preview
How to connect mysql with java program in command prompt?Steps:1. First, you have to install mysql server, that is wamp server or xamp server.2. Then, you have to start wampserver or xamp server.3. Then, you have to create some database.4. Then, you need a jdbc driver or connectin! mysql to java pro!ram. That would be installed by yoursel. " you need the #le, then !o to www.mysql.com.$. Then, that installed #le contains an jar #le li%e, named as mysql&connector&java&$.1.3$&bin.jar.'. That would be copied by yoursel and paste it on the place where you install your java #le named as jd%1.(.) or *.) or somethin!. "n that, jd%1.(.)+jre+lib+ext path would be selected by yoursel and copy the connector#le.(. Then, the pro!ram would be compiled and executed successully.*. ,r otherwise, you need to set the path in your command prompt li%e this.set classpath-.c/01ro!ram Files02ava0jd%1.$.)3)(0jre0lib0ext0mysql&connector&java&$.1.3$&bin.jar.4This is the way to connect mysql database in your basic java pro!ram.How to connect mysql with java program in netbeans?Steps:1. "n this also, havin! the same #rst $ steps would be done by yoursel, which would be !iven above.2. Then, !o to your netbeans ide and in that, which project you need the connection.3. 5elect the project, in that contains an libraries older that would be !iven below in a pictorial ormat.4. "n that, you have to add your jar #le mysqlconnector.$. Then your project would contain the jar #le.This is the way to connect mysql database in java throu!h netbeans ide.