Forum Stats

  • 3,769,714 Users
  • 2,253,014 Discussions
  • 7,875,157 Comments

Discussions

Mac OS X

Lenka Kasparova-Oracle
Lenka Kasparova-Oracle Member Posts: 21 Employee
edited Jun 24, 2015 11:01AM in MySQL Community Space

MySQL.com OS X resources for installation can be found here

Troubleshooting with Mac OS X 10.4.4 and PHP

If you are having trouble with PHP and MySQL. You have to chagne the socket options.

E.G with TYPO3

if you get something starting with the following: Warning: mysql_pconnect(): Can't connect to local MySQL server through socket '/var/mysql/mysql.sock'
You have create the missing directory: sudo mkdir /var/mysql
and create a softlink like this: sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock
Original Solution can be found in the Mambo-forum as follows:

''/etc/php.ini(.default) looks for mysql.sock in the wrong place... two options are to make a symbolic link from the right place to the socket... Or you can update your php.ini (.default) by finding "mysql.default_socket" and setting it to equal /private/tmp/mysql.sock and then restart apache with "apachectl graceful"''