How to fix Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/mysql/mysql.sock'
Apparently, Mac OS X doesn't allow for PHP MySQL connection out of the box. You get this:
Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/mysql/mysql.sock'
OR In CakePHP
Warning: Could not connect to Database.
I found the most clear fix here:
/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...
sudo mkdir /var/mysql
sudo ln -s /private/tmp/mysql.sock /var/mysql/mysql.sock
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 web server
[bob@workstation ~]$ ssh -D 1080 bastion.securecorp.io [bob@bastion ~]$ SOCKS5 configuration in Firefox: Source: https://www.redhat.com/sysa...
I was moving my cakephp application to a new server and had this issue: Error: The requested address “/” was not found on this server. The...
When using PHP exec command, if you find sh: Command not found , error in your web server logs, you have to export the full path of that com...
If you get the following error while installing FFMPEG or other packages on CentOS 7. Requires: libva.so.1(VA_API_0.33.0)(64bit) Follow...