Greg's Blog

helping me remember what I figure out

Mysql Set Up

| Comments

I have to give the guys at BD a lot of credit for the documentation and the level of support they provide on the New Atlanta mailing list, this time they stepped into the breach and helped resolve my problems getting the MySQL jdbc driver to work with BlueDragon.

First things first though, the fact that I had problems with MySQL and verifying a connection from BD, had nothing to do with the instructions provided by BD. Rather this was a Debian issue and Gregg Orangio was quick to point out that the verification failure was most likely down to MySQL not accepting connections via port 3306. Which struck me as odd, since I had been happily using PHP/MySQL to drive this site for yonks now… Well assumptions are the mother of all f*#ck ups as I always say.

PHP uses the MySQL.sock file to carry out it’s connections, JDBS however relies on tcp/ip. So here is how you check if the MysQL is listening on port 3306:

netstat -ltpn

This nifty little Linux shell command, returns all the services and what ports they are listening on. And guess what? Yep no MySQL. A little more digging pointed the finger at Debian’s default install which disables networking. Locate your mysql.conf and comment out the skip-networking directive.

# The skip-networkin option will no longer be set via debconf menu. You
# have to manually change it if you want networking i.e. the server
# listening on port 3306. The default is “disable” - for security
# reasons.
# skip-networking

Next simply re-start MySQL so that the configuration changes can take effect and you are done!