LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-07-2005, 06:00 AM   #1
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 15.0 (multilib)
Posts: 1,350

Rep: Reputation: 75
Mysql and mysql java connector, connection refused


I have had a problem with mysql and mysql java connection on a new installation of Slackware 10.2. This was installed with the option to automatically start the mysql server selected.

My problem was that I could log on to mysql from the command line but connection from a java program was refused whatever the user. I did not even have a response like 'refused for 'alan'@'localhost', just connection refused.

I found that if I deleted the /var/lib/mysql/mysql files and then rebooted thus preventing the server from starting I could restore files, start the server and everything connected Ok. The problem was that when I rebooted I had the same problem as before, I could connect from the command line but not through java. I also could not find a way of stopping the server when it had been autostarted.

In the end, out of frustration I did a re-installation. I did not select autostart for mysql. Instead I added mysqld_safe & to rc.local. Everything is working fine.

So I have sorted it out. I just wonder if there is a particular problem with the way slackware autostarts the mysql server?
 
Old 11-07-2005, 12:35 PM   #2
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 53
Maybe you've SKIP="--skip-networking" set in your rc.mysqld file. That will make mysql to run without listening for TCP/IP connection, so, the java connector won't work.
 
Old 11-08-2005, 03:11 AM   #3
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 15.0 (multilib)
Posts: 1,350

Original Poster
Rep: Reputation: 75
Thanks, I didn't realise that the mysqljava connector depended on TCP/IP

Does anyone know how slackware defaults for the rc.mysqld file if starting mysql is selected at installation?
 
Old 03-29-2008, 01:41 AM   #4
anydoby
LQ Newbie
 
Registered: Mar 2008
Posts: 7

Rep: Reputation: 0
I tried to comment the SKIP NETWORKING in my /etc/rc.d/rc.mysqld but it did not help.

Here is what helped though http://anydoby.com/jblog/article.htm?id=100&lng=en
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
java + connection to mysql linux_ub Programming 5 03-04-2012 10:59 AM
Mysql connection refused oulevon Programming 9 07-20-2010 06:47 AM
[ JSP/JAVA ] MySQL connection fails White R4bbit Programming 4 04-27-2005 08:31 AM
Where to put mysql-connector-java folder dukehazord Linux - General 1 09-10-2004 11:30 AM
MySQL/Java connection problem hudy Programming 3 06-23-2004 08:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration