I want to connect my java application in to MySQL data base.But I haven't that special connector.If anyone have that, please send it to me.I need it in exe format.please help me.
My email - Dushantha12@gmail.com.
Please UseCodeTags when posting code. You should provide username & password along with the URL in the "getConnection()" method. And are you able to connect to your MySQL server directly (i.e: from your command prompt or any GUI tool)?
Connect to DB directly mean what? This is the code I only know to connect the db. Are there any other methods for connect DB? I have MySQL Workbench.I tried to create a password and user name.but there is a field, it is Pipe path.what is that?
Well, MySQL Workbench is an ER modeling tool for MySQL, not a DB server. You can use it to for reverse engineering, SQL script generation and more.. You should have a MySQL server running, if not then download/install/configure it from here
Thank you very very much.....
I did it... I was connected the database and did my application functions.I did copy the connector (.jar file) in to,
And I did set CLASSPATH in environment variable section in Advance system settings.
dushantha Rathnayake wrote:I did it... I was connected the database and did my application functions.I did copy the connector (.jar file) in to, C:\Program Files\Java\jdk1.6.0_10\jre\lib\ext\mysql-connector-java-5.1.12-bin.jar
Don't put third party libraries inside the JDK/JRE installation folder. It's a bad practise...