Threesuns

Email

Contact

All Semesters

Semesters

All Courses

Courses

PHP Programming (Online)

CSYS2463

3 credits

Setting up MySQL for PHP Development on a Mac

How To
Picture 13

Begin Configuration of the MySQL Socket

Step 7

At this point the MySQL server should be running and you should be able to connect to it using the Workbench tool. PHP, however, will still be unable to connect to the MySQL server because it is looking for its socket in the wrong place.

In order to correct this we need to create a link to the actual socket file from where PHP will look for it.

To do this open the OSX terminal application (under applications/utilities) and run the following command: sudo mkdir /var/mysql

You'll be required to type your password for this command to succeed. When the command is done no output will be shown. As long as you don't see an error then it worked.