LinuxGroup
11-21-2001, 11:51 PM
Doesnt anyone know how to compile or configure this to connect to mysql through /tmp/mysql.sock ? It looks for /usr/lib/mysql/mysql.sock but thats not where it is. I tried making a sys link but tha didnt work.
Thanks
bitserve
11-22-2001, 07:24 AM
Did you compile DBD::mysql at all, or did you download a binary form of it from somewhere? I've never heard of it getting compiled with the wrong libraries. But maybe you just specified the wrong path to mysql when you were compiling?
The socket that DBD::mysql uses is compiled into the mysql.so file in your DBD directory.
If you don't want to recompile, you can specify the mysql_socket when you make a connection in your perl scripts.
(SH)Saeed
11-22-2001, 09:11 AM
You can specify where you want mysql.sock to be created. Simply edit/create the file /etc/my.cnf and make sure you have the following lines:
[client]
port=3306
socket=/tmp/mysql/mysql.sock
[mysqld]
port=3306
socket=/tmp/mysql/mysql.sock
You might have a different port number, but the socket=/path/to/mysql.sock needs to be under both [client] and [mysqld]. After that, just restart mysql and you should be set.
Another way I think would be that your start mysql with --socket=/path/to/mysql.sock, but the first way I mentioned is more permanent.