For those who struggle with the error 'DBI connect('orthomcl7','root',...) failed: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)' while running OrthoMCL, I might have found a simple solution.
When connecting to a MySQL server located on the local system, the mysql client connects through a socket which is typically located in /tmp/mysql.sock. However, the socket can be placed elsewhere, in my case it was /var/run/mysql/mysql.sock.
You need to:
1) Find the right location of the socket and replace it in the mysql.cnf e.g.
2) In the config_file (needed for the orthomcl modules like orthomclInstallSchema) you need to specify the socket for the dbConnectString like so:
Hope this helps!
When connecting to a MySQL server located on the local system, the mysql client connects through a socket which is typically located in /tmp/mysql.sock. However, the socket can be placed elsewhere, in my case it was /var/run/mysql/mysql.sock.
You need to:
1) Find the right location of the socket and replace it in the mysql.cnf e.g.
Code:
socket=/var/run/mysqld/mysqld.sock
Code:
dbConnectString=dbi:mysql:orthomcl[B];mysql_socket=/var/run/mysqld/mysqld.sock[/B]
Comment