Re: to do mysql source command from perl
Rytis Diciunas Wrote:
> $sth = $dbh->prepare ("source /home/user/ids.sql;");
> $sth->execute;
>
> where ids.sql includes other source and load commands....
>
> mysql gives me error:
> DBD::mysql::st execute failed: You have an error in your SQL syntax;
'source' is not an SQL command, but an internal command of the mysql command line client.
You could use Perl's system() function:
system('/path/to/mysql -uuser -ppassword database </home/user/ids.sql');
--
felix
Please use
BBCode to format your messages in this forum.
Subject
Written By
Posted
November 15, 2006 07:22AM
Re: to do mysql source command from perl
November 15, 2006 07:38AM
November 15, 2006 08:23AM
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.