try this: $sql_user = "username"; $sql_pass = "password"; $host = '127.0.0.1'; $sql_conn = "dbi:mysql:dbname:$host:3306";
On Sun, 4 Sep 2005 13:09:29 +0100, "dan" <[EMAIL PROTECTED]> said: > hey > i have a problem that's now really really frustrating me. it's probably > not > a problem with the perl program itself, but it's the only thing that's > actually given me this error, and i was wondering if anyone's ever come > across this before. > i've just upgraded from mysql 3.23.55 to 3.23.59. now, no matter what i > try, > every time i launch my perl program, i get this: > > [EMAIL PROTECTED] ~/cucco]$ DBD::mysql::st execute failed: MySQL server has > gone > away at ./bot.pl line 117, <GEN0> line 69. > DBD::mysql::st execute failed: MySQL server has gone away at ./bot.pl > line > 117, <GEN0> line 75. > > i've tried moving code around various places, and the error appears on > every > $sth->execute i try to run. i connect to the db using: > > $sql_user = "username"; > $sql_pass = "password"; > $sql_conn = "dbi:mysql:dbname:localhost:3306"; > $dbh = DBI->connect($sql_conn, $sql_user, $sql_pass) or die "Can't > connect > to SQL Server: $DBI::errstr\n"; > > then all the sql statements are run by doing: > $sth = $dbh->prepare("SQL STATEMENT"); > $sth->execute; > and it's the above execute line it says the mysql server's gone away on. > the > other thing is, it goes away instantly. the wait_timeout on the sql > server's > still default (8 hours, i believe). and i've *never* had a problem with > this > code before. something's happened to a configuration, or something, and i > can't figure out why. i'm now tearing my hair out over this. > has anyone ever come across this before? if so, how did you fix it? > > many thanks > dan > > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > <http://learn.perl.org/> <http://learn.perl.org/first-response> > > -- Jeff Pan [EMAIL PROTECTED] -- http://www.fastmail.fm - Send your email first class -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>