MySQL 5 ColdFusion 7 Datasources

In moving my laptop to linux, I've been looking into MySQL. Getting it set up was easy with the package manager. I just set it to get MySQL 5 and phpMyAdmin. I already had Apache and PHP.

After installing, I messed around in phpMyAdmin and create a database and test table. The next step was to create a CFMX 7 datasource. I looked in the drop-down of buit-in drivers, and the option for MySQL said (3.x). So, I started googling and found this technote on adobe.com. I tried for hours with multiple versions of the MySQL Connector/J trying to get my a datasource connected. It just wouldn't work.

Well, tonight at the Scorpio Feature Tour event in PDX (exciting stuff, I'll try to blog soon), Barney Boisvert gave me the answer.

In the configuration file for MySQL, /etc/my.cnf, there is a flag, skip-networking. All I had to do was comment out that line and restart MySQL.

So, If you're getting "Cannot connect to MySQL server on host:3306" while trying to set up a MySQL 5 datasource in CFMX 7 under linux, put a # in front of "skip-networking" in your /etc/my.cnf file and restart MySQL with something like "/etc/init.d/mysqld-max restart".

Oh, by the way, you can actually use the 3.x driver as long as you have the old_passwords option set.

Comments
Andrea's Gravatar Is a lifetime that i try to connect ( on win ) my CFMX7 on standalone to mysql4.1
( i use easy php system).
Any idea???

Thanks

Andrea
# Posted By Andrea | 5/12/07 11:02 AM
Michael's Gravatar I hope this works ....... this looks like the answer to my question.
# Posted By Michael | 6/23/07 6:43 AM
BlogCFC was created by Raymond Camden. This blog is running version 5.6.002.