MySQL Forums
Forum List  »  Perl

Re: A simple mysql->connect problem
Posted by: Felix Geerinckx
Date: February 09, 2006 08:57AM

Jonathan Freese wrote:

> $host="localhost";
> $database="mysql";
> $user="root";
> $password="myrootpassword";
>
> $db=mysql->connect($host, $database, $user, $password);

Try this instead:

$db=DBI->connect("dbi:mysql:$database:$host", $user, $password);

--
felix
Please use BBCode to format your messages in this forum.

Options: ReplyQuote


Subject
Written By
Posted
Re: A simple mysql->connect problem
February 09, 2006 08:57AM


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.