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? |
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.
|
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? |
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 |
All times are GMT -5. The time now is 12:57 PM. |