Nik has asked for the wisdom of the Perl Monks concerning the following question:
here is the line 20 code and the followinf line just sets the enviromental variable correctly in case the script run in the remote server instead of the localhost.DBI connect('nikos_db','e_shop',...) failed: Can't connect to local My +SQL server through socket '/var/run/mysqld/mysqld.sock' (2) at /home/ +www/nikos.varsa.gr/cgi-bin/index.pl line 20
I just don't see why i can't connect to the mysql server although the credentilas are correct and the myslq server name too.
#===================================================================== +========== my $db = ( $ENV{'SERVER_NAME'} !~ /freehostia/ ) ? DBI->connect('DBI:mysql:e_shop', 'root', 'supersecret', {Rais +eError=>1}) : DBI->connect('DBI:mysql:nikkou6_db:mysql3.freehostia.com', 'n +ikkou6_db', 'supersecret', {RaiseError=>1}); if( $ENV{'SERVER_NAME'} =~ /freehostia/ ) { $ENV{'DOCUMENT_ROOT'} = ' +/www/nikos.varsa.gr/' }; #===================================================================== +==========
20070701 Janitored by Corion: Changed password
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Canot connect to the remote mysql server through those lines
by snopal (Pilgrim) on Jul 01, 2007 at 20:20 UTC | |
| |
|
Re: Canot connect to the remote mysql server through those lines
by shmem (Chancellor) on Jul 01, 2007 at 20:07 UTC | |
by Nik (Initiate) on Jul 01, 2007 at 20:44 UTC | |
by shmem (Chancellor) on Jul 01, 2007 at 20:48 UTC | |
by Anonymous Monk on Jul 02, 2007 at 05:46 UTC | |
| |
|
Re: Canot connect to the remote mysql server through those lines
by marto (Cardinal) on Jul 01, 2007 at 20:12 UTC | |
|
Re: Canot connect to the remote mysql server through those lines
by davidj (Priest) on Jul 05, 2007 at 03:39 UTC | |
|