MySQL 'could not connect'


I sent this to support, but it’s a weekend; thought I’d try the forum too :slight_smile:

I have an application I first developed on Real Studio 2012r1.2, under Windows 7. I’m now developing it locally, on a Mac with OS X 10.8.4. I’m using Xojo 2013r2 and just renewed my licenses for Web development and Database access.

I’ll be deploying the web version on a linux server. I’m accessing a MySQL database, already loaded on the target-deployment server. In my local development, on the prior Real Studio version under Windows 7, to access the database I would open a Putty session and setup port forwarding so I could access MySQL on localhost, port 3306. I’m doing the same thing on the Mac using Terminal.

When I add a MySQL Community Server database to my app under Xojo now, using localhost and port 3306 as before, I can no longer connect to the database. I installed the MySQL Workbench to make sure my port forward was working correctly, and I can access the remote database fine, with the port forward setup under Terminal, using Workbench. Also, the MySQL Community server is in the plugins folder, where I believe it should be.

I’ve played with various combinations of starting/stopping Xojo, deleting and reinstalling the database connection, etc., and still can’t connect.

Can you help? What further information, if any, do you need me to provide? Might this be an OS X 10.8.4 problem?


Unlikely - I’m using 10.8.4 and MySQL without issue.

I’m not familiar with this technique, but the way you worded it makes it seem like the forwarding is occurring only within that Terminal session, and that you to launch Workbench from there so that it has access to the forwarded port. If this is the case, then getting Xojo to run the same way may be the issue. My apologies If I’m not understanding how this is supposed to work.

Another possibility is to try instead of localhost. I have run into situations where that made a difference.

Thank you, Jay. I substituted as you suggested and that fixed it! I had that thought in the back of my mind already, but was telling myself, "Na, that shouldn’t matter… ".

That’ll teach me :slight_smile:

Thank you, also, Kim. I appreciate you eliminating that as a possible problem for me.