Yesterday tried to deploy a thinkphp for development on C9, but there was a problem when trying to connect to the database. After finding the data found this problem is caused by not finding Mysql.sock This file (this thing is estimated to be the connection thread of MySQL). Then, the bitter force, and change php.ini but a little effect has not, finally found a soft connection method, but the tutorial gave the address does not apply to C9. At last it was unbearable to knock a bit of MySQL, suddenly jumped out of a line "ERROR 2002 (HY000): Can ' t connect to local MySQL server through socket '/var/run/mysqld/mysqld . Sock ' (2) ". The moment is bright, this is not exactly the address you are looking for (>_<).
Don't say much nonsense. I say how to solve this problem, open a terminal, and then enter
sudo Ln -S /home/ubuntu/lib/mysql/socket/mysql.sock/var/run/mysqld/mysqld.sock
Enter, if you do not have any hints to succeed, try again.
CLOUD9: Troubleshoot thinkphp "No such file or directory" error when connecting to database at run time on C9