Using DBD :: mysql with DBI, I get the following error when trying to connect to the database.
DBI connect('database=mydb:host=localhost','someuser',...) failed: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) at ./myscript.pl line 97
Yes, MySQL is up and running. The problem is that mysql.sock is not located in / tmp.
I know the location of mysql.sock, and currently I hacked it, so that it works, I created a soft link to the current location of the mysql.sock file. I would prefer not to change the configuration of MySQL, although this would probably be the easiest task.
Is there a way to go into DBD :: mysql and configure it to look for mysql.sock in the right place?
mysql perl dbi
bkoch
source share