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?
|