Skip to main content
Inspiring
December 13, 2007
Question

php/mysql problems Mac OS 10.4

  • December 13, 2007
  • 2 replies
  • 384 views
After upgrading to Mac 10.4 from 10.3, I get this message on my dynamic
pages
Can't connect to local MySQL server through socket
'/var/mysql/mysql.sock' (2)

I can connect to both the local and remote mysql server from the terminal.

As far as I can tell there is no directory named "mysql", so
"Hard Drive:var:mysql" mysql doesn't exist.

php works fine, but I also get a warning:
Warning: mysql_connect() [function.mysql-connect]: Protocol mismatch;
server version = 9, client version = 10
Connected successfully


I've googled all over, I'm stumped.
Mick
This topic has been closed for replies.

2 replies

Inspiring
December 15, 2007
David Powers wrote:
> Mick White wrote:
>
>> After upgrading to Mac 10.4 from 10.3, I get this message on my
>> dynamic pages
>> Can't connect to local MySQL server through socket
>> '/var/mysql/mysql.sock' (2)
>
>
> Try this in Terminal:
>
> ln -s /var/run/mysqld/mysqld.sock /tmp/mysql.sock
>
Thanks David, this is what I did along the same lines:
sudo mkdir /var/mysql
sudo ln -s /private/tmp/mysql.sock /var/mysql/mysql.sock

http://forum.mamboserver.com/showthread.php?t=70766


Mick
Inspiring
December 14, 2007
Mick White wrote:
> After upgrading to Mac 10.4 from 10.3, I get this message on my dynamic
> pages
> Can't connect to local MySQL server through socket
> '/var/mysql/mysql.sock' (2)

Try this in Terminal:

ln -s /var/run/mysqld/mysqld.sock /tmp/mysql.sock

--
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/