Warning: mysql_connect():  No such file or directory (trying to connect via unix:///var/mysql/mysql.sock) in /Users/Mvohra/Sites/projects/webservices/apps/functions.php on line 8
Warning: mysql_connect(): No such file or directory in /Users/Mvohra/Sites/projects/webservices/apps/functions.php on line 8
Could not connect: No such file or directorymymac:admin
When trying to connect to mysql database using PHP, it not able to connect to mysql. The php connect function using the mysql sock file descriptor to connect. At times the location of the sock file is different. You can specific the location of sock file as the input to the connect function
Find out the sock file location if this is at different location then the default.
To see the PHP configuration, you can watch the output of phpinfo.
The MySQL Database can be administrated with phpMyAdmin.
To connect to the MySQL Server from your own scripts use the following connection parameters:
$link = mysql_connect('localhost', 'root', 'root'); // use default sock path.
or you can connect using an UNIX Socket located at location:
$link = mysql_connect(