MySQL Forums
Forum List  »  Perl

$dbh->func('createdb' =>>> MySQL server has gone away
Posted by: Henry Rolofs
Date: March 30, 2007 08:20AM

Hello,

I use openSUSE 10.2 with perl 5.88 and mysql 5.0.26.

I got an error when I try do create more the on databases with a dbh database handler. If I try to create the Databases with a drh (driver handle) then it works.

my $dbh = DBI->connect("DBI:mysql:mysql:$DBHOST:$DBPORT");

The connection is successful to the default databases mysql.

Now I create a new database.

$dbh->func(‘createdb’, ‘newdb1’, ‘admin’);

The new database is successful created;

Now I try to create a second database;

$dbh->func(‘createdb’, ‘newdb2’, ‘admin’);

This database isn’t created and I got the messages “MySQL server has gone away”

Any ideas whats going wrong when i use dbh to create databases?

Henry



Edited 1 time(s). Last edit at 03/30/2007 08:30AM by Henry Rolofs.

Options: ReplyQuote


Subject
Written By
Posted
$dbh->func('createdb' =>>> MySQL server has gone away
March 30, 2007 08:20AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.