Hello.
It seems that your DBD::MySQL module doesn't read configuration file,
or [client] group. Use mysql_read_default_group and mysql_read_default_file
in your DSN:
$dbh = DBI-connect
(DBI:mysql:test:localhost;mysql_read_default_file=/etc/my.cnf;.
mysql_read_default_group=dbdmysql, user,pass, {RaiseError = 1})
or die connecting : $DBI::errstr\n;
Or explicitly specify the socket in DSN. See:
http://search.cpan.org/~capttofu/DBD-mysql-3.0002/lib/DBD/mysql.pm
I can connect on the command line, but have problems connecting using DBI/D
on the same server.
# ./bin/mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 4.1.0-alpha-standard
Mysql is running
# ps -ef | grep mysql
root 10626 9589 0 11:57 pts/341 00:00:00 /bin/sh ./bin/mysqld_safe
mysql10642 10626 0 11:57 pts/341 00:00:00 /usr/local/mysql/bin/mysqld
--defaults-extra-file=/usr/local/mysql/data/my.cnf --bag
...
I can connect at the command line
# ./bin/mysql -username=hcspt
Welcome to the MySQL monitor. Commands end with ; or \g.
When I connect using perl on the same server the following error occurs
...failed: Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock'...
Ive noted that mysql.sock is not in the location in the same directory as
the above error message
# find / -name mysql.sock
/tmp/mysql.soc
Setting the location of mysql.sock in my.conf
[client]
socket = /tmp/mysql.sock
Causes error
Any suggestions?
Thanks
Terry
Terry Spencer [EMAIL PROTECTED] wrote:
--
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
__ ___ ___ __
/ |/ /_ __/ __/ __ \/ /Gleb Paharenko
/ /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED]
/_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.NET
___/ www.mysql.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]