Simply put a file Named ” mysql-connector-java Its in requirement of my project to work with WAMP. Thor 4, 12 53 Please be thoughtful, detailed and courteous, and adhere to our posting rules. By clicking “Post Your Answer”, you acknowledge that you have read our updated terms of service , privacy policy and cookie policy , and that your continued use of the website is subject to these policies. Any specific reason you used for port number? Farshid updated the post, same thing:

Uploader: Nelkis
Date Added: 4 September 2007
File Size: 53.97 Mb
Operating Systems: Windows NT/2000/XP/2003/2003/7/8/10 MacOS 10/X
Downloads: 58738
Price: Free* [*Free Regsitration Required]

connect java to mysql using jdbc on osx – Stack Overflow

Examples of connection string for other databases can be found here. Thanks for posting the solution! However, the port should be fine, here’s a screenshot of my MAMP config grab. Please provide connection strings as you tried including exceptions you received.

The driver has not received any packets from the server. If you installed Mmp just because of that, then shame Outdoors – Walk, Cycle, Kitesurf.

MAMP (Mac) Documentation > How Tos > Connect to MySQL from PHP

Post as a guest Name. This site uses Akismet to reduce spam. Its just because your mysql service is not running Hope it will help 1. Because i m working on windows right now Sign up or log in Sign up using Google. However, i do now have a live server, so i think ill take your advice. I am a sophisticated programmer and don’t do shame things.


Right click on the project and select Properties. I’ve set up a simple java app with the following function: Maybe you are not running as localhost on your machine but that would be odd as I thought it was default.

Driver have i missed something?

Connecting to MySQL for MAMP Installations

Thanks for your help. Sign up using Email and Password. This worked for me. On both platform windows and linux I m done with its solution and writing the steps i followed Mysql is installed by default on port if you will simply install the mysql and run the above code you will get the Exception: I didn’t see the all threads thats y i adopt only the first one solution but now its clear to me.

Normal MAMP requires a bit more work and this link should help.

Any ideas on how to fix this? Hi, firstly i love you, secondly, is there a way i can get this to work in netbeans?


With this in mind, i think i have not defined a class path, which on its own it a pain. I also have this mysterious error on OSX and didn’t found any solution the first time the error occurred.

Putting anything in default Java mysq directory is bad idea.

If you creating just simple application you can keep JAR file in same directory as your source code for easy compiling. In this scenario just skip the section for package creation and go directly for adding resources. Only maml hosted on the same machine can connect with the mysql server.

Secondly when you will deploy your connectivity code into an applicationthen u will have to save the connector ” mysql-connector-java Neeraj Pandey 1 1.