Nik has asked for the wisdom of the Perl Monks concerning the following question:
$db = ($ENV{'SERVER_NAME'} ne "50free.net") ? DBI->connect("DBI:mysql:nikos_db", "root", "") : DBI->connect("DBI:mysql:nikos_db:50free.net","nikos_db","macgyver +") or print font({-size=>5, -color=>'Lime'}, $DBI::errstr) and exit 0
janitored by ybiC: Retitle form "clarification question"
I also wanted to show you that when i use the above code my index.pl page gives me this error:but when i am using the following it works ok!Can't connect to local MySQL server through socket '/var/run/mysqld/my +sqld.sock' (2)
why is this happening?$db = DBI->connect('DBI:mysql:nikos_db', 'root', '') or $db = DBI->connect('DBI:mysql:nikos_db:50free.net', 'nikos_db', 'macgy +ver', {RaiseError=>1});
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Ternary confusion
by gryphon (Abbot) on Feb 27, 2004 at 20:45 UTC | |
| |
Re: Ternary confusion
by esskar (Deacon) on Feb 27, 2004 at 20:49 UTC | |
by dragonchild (Archbishop) on Feb 27, 2004 at 21:05 UTC | |
by arturo (Vicar) on Feb 28, 2004 at 00:11 UTC | |
by dragonchild (Archbishop) on Feb 28, 2004 at 04:24 UTC | |
| |
Uhh change your passwords.
by mutated (Monk) on Feb 27, 2004 at 21:07 UTC | |
Re: Ternary confusion
by derby (Abbot) on Feb 27, 2004 at 20:39 UTC |