Can’t connect to LimeSurvey database. Reason: No such file or directory
I am trying to install LimeSurvey and keep gettings this error, “Can’t connect to LimeSurvey database. Reason: No such file or directory”. After debugging the code I discovered if you specify ‘localhost’ as the hostname of your database server it does not use ‘localhost’ connect to the database. It uses the Unix file socket ‘unix:///tmp/mysql.sock’. On an Apple server the mySQL socket file is usually located in ‘/var/mysql/mysql.sock’. The easiest way to fix the problem is to create a soft link.
ln -s /var/mysql/mysql.sock /tmp/mysql.sock
Advertisement