List:General Discussion« Previous MessageNext Message »
From:Daevid Vincent Date:June 3 1999 10:08pm
Subject:Re: Msql-Mysql-modules-1.2014 "make test" can't connect (half solved)
View as plain text  
> The problem may be that perl isn't using the socket:
> /var/lib/mysql/mysql.sock
> to connect to MySQL
> Try setting:
> MYSQL_UNIX_PORT=/var/lib/mysql/mysql.sock
> export MYSQL_UNIX_PORT
> and run 'make test' again!

OK, that kinda worked.. I say kinda, because I use tsch and I had to switch into bash to
do
this.
the make test worked and make install worked fine.

However, exiting out of bash, trying to run a perl program I had written I get these same
errors that I was getting before with the make test: My programs sometimes run from
crontabs
and sometimes I run them myself, so I need to fix this once and for all, and not rely upon
exporting variables for each script.

[root=ttyp0]2:44pm:{/root}> ./check_mysql.cron
Can't connect to local MySQL server (2) at /www/html/private/sql/check_mysql.pl line 48
Cannot connect to mySQL server: Can't connect to local MySQL server (2)

And, as you'd expect:
[root=ttyp0]2:44pm:{/root}> bash
bash# ./check_mysql.cron
Can't connect to local MySQL server (2) at /www/html/private/sql/check_mysql.pl line 48
Cannot connect to mySQL server: Can't connect to local MySQL server (2)
bash# MYSQL_UNIX_PORT=/var/lib/mysql/mysql.sock
bash# export MYSQL_UNIX_PORT
bash# ./check_mysql.cron
bash#

so the question is, how do I tell Perl to use /var/lib/mysql/mysql.sock always?
or perhaps, how do I find out where is Perl looking now, then I can just make a symbolic
link?

Daevid.

btw, I am going to name my first child after you!

Thread
Msql-Mysql-modules-1.2014 "make test" can't connectDaevid Vincent3 Jun
  • Msql-Mysql-modules-1.2014 "make test" can't connectMichael Widenius3 Jun
  • Re: Msql-Mysql-modules-1.2014 "make test" can't connect (half solved)Daevid Vincent4 Jun
  • Re: Msql-Mysql-modules-1.2014 "make test" can't connect (solved)Daevid Vincent4 Jun
    • Re: Msql-Mysql-modules-1.2014 "make test" can't connect (solved)Michael Widenius4 Jun
  • Re: Msql-Mysql-modules-1.2014 "make test" can't connectIBS216 Jun
  • Re: Msql-Mysql-modules-1.2014 "make test" can't connectDaevid Vincent16 Jun