I'm running MAMP on Mac OS X Tiger and trying to connect PowerArchitect to it's MySQL database. I suspect it may be the socket path that needs to be changed. Any ideas of what I need to do and how?
It looks like your MySQL is not accepting connections on the TCP port you're trying to connect on. The default port for MySQL is 3306.
You could try this from a terminal window to test that MySQL is accepting connections. Assuming the database is on the local machine, the command to try would be telnet localhost 3306.
Here's what a failure would look like:
$ telnet localhost 3306
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
telnet: Unable to connect to remote host
Here's what success looks like:
$ telnet localhost 3306
Trying ::1...
Connected to localhost.
Escape character is '^]'.
4
5.0.459Ay`Uf%~,q:j,7nGW_Vs`Connection closed by foreign host.
If you get the latter result, then there's probably something wrong with the connection config within the Architect. If you get the former, then you need to tell MySQL to accept connections from localhost on port 3306.
I had a similar problem while trying to import sql using ant's sql task. First I figured out to add -verbose to ant's command line. Then I got these exceptions. Then I found this forum post and I can't express how much I'm grateful for the solution. Indeed I use xampp and its security script asks to disable networking. At the time when I answered 'yes - disable' I had no idea I will not be able to connect from Java from localhost via tcp.
Interestingly I have suspected the culprit - connection refused/access denied. So I tried to connect from the ssh and it worked. Thank you for the telnet hint.