aspose file tools*
The moose likes JDBC and the fly likes connecting to MYSQL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "connecting to MYSQL" Watch "connecting to MYSQL" New topic
Author

connecting to MYSQL

Candy Bortniker
Ranch Hand

Joined: Mar 17, 2003
Posts: 123
I am trying to connect to MYSQL to build a table. I know I did it last semester but I don't remember exactly what I did. It seems like there is a file I have to go into to change a setting but that could be wrong. Here is the exception I'm getting:

Unable to connect to any hosts due to exception:java.net.SocketException: Network is down:

Any suggestions?
Karen Gomes
Ranch Hand

Joined: Aug 25, 2003
Posts: 60
Yes there is my.ini or my.cnf that you can go and make changes to. This file is in your windows or winnt folder. The mysql/winmysqladmin.exe will also let you modify it. Also confirm if you are using the right userID and password.
I just spent the entire day today getting the initail set up for mysql working. Let me know if this still doesnt help.
Karen
Candy Bortniker
Ranch Hand

Joined: Mar 17, 2003
Posts: 123
It just occured to me that I the last time I worked with MYSQL I needed to click on something (a file maybe) and it would give me an icon down by the clock with the other icons. Once I get that icon I should be ok but I don't remember what to click on to get it. Does this sound familiar?
Lu Battist
Ranch Hand

Joined: Feb 17, 2003
Posts: 104
Sounds like you need to start mysql as a service.
Depending on your version, it does this automatically so you probaly have it there already, you'll just need to go to services and set it up as automatic or leave it in manual and actually start it.
Candy Bortniker
Ranch Hand

Joined: Mar 17, 2003
Posts: 123
Ok, how would I do that exactly?
Malhar Barai
Author
Ranch Hand

Joined: Aug 17, 2001
Posts: 399
hi..
Alternatively you can put the winmysqladmin in the startup, this will make mysql start automatically when you system is started.
HTH
MB


Malhar Barai
SOA & Java Book
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: connecting to MYSQL