Web Hosting Talk







View Full Version : DBI, MySQL Perl /DBD::mSQL


LinuxGroup
12-05-2001, 02:42 PM
By default, this module uses /usr/lib/mysql/mysql.sock to connect. Does anyone know how to change the path to /tmp/mysql.sock ?


samething for DBD::mSQL

Let me know

Thanks

LinuxGroup
12-05-2001, 03:29 PM
got it ;)

clocker1996
12-05-2001, 05:11 PM
how did you do it
please tell me
i had a problem earlier
where it would keep goign to /var/lib/mysql.sock
i tried symlinking the real mysql.sock with what the dbd stuff was going it didtn work

LinuxGroup
12-05-2001, 07:12 PM
I changed the paths in /etc/my.cnf and /etc/php.ini

Heres the lines to change



FILE /etc/my.cnf


[client]
socket = /var/lib/mysql/mysql.sock


[mysqld]

socket = /var/lib/mysql/mysql.sock

------------------------------------------------------------------------------------

FILE /etc/php.ini

mysql.default_socket = "/var/lib/mysql/mysql.sock"





After you change those files, run these commands

shell > killall -9 safe_mysqld
shell > killall -9 mysqld
shell > safe_mysqld &

Then stop and restart apache. Thos 'paths' above are the pathes my perl module were trying to use. Since I didnt know how to change the perl module paths, I changed the path to mysql.sock . The mysql.sock will automaticly be created after you change the paths and run the above commands. Sysm linking does not work with mysqll.sock .Let me know if you need more help. ;)