Hi,
This stuff is pretty new to me , but you could try this :
use DBI;
my $database = "mydatabase" ;
my $servername = "localhost" ;
my $username = "username" ;
my $password = "password" ;
$dbh = DBI->connect("DBI:mysql:database=$database;host=$servername ,
$username , $password) ;
It's all the
Hello A,
Wednesday, November 14, 2001, A Taylor <[EMAIL PROTECTED]> wrote:
AT> I am tring to connect to a MySql database and I have been told that I have
AT> to include the 'HOSTNAME' (localhost). Can anyone see anything wrong with
AT> this code ??
AT> use DBI;
AT> my $database= 'myd
[mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, November 14, 2001 6:44 AM
> To: [EMAIL PROTECTED]
> Subject: HELP - I am trying to connect to a MySql database
>
>
> I am tring to connect to a MySql database and I have been
> told that I have
> to include the 'HOSTNA
I am tring to connect to a MySql database and I have been told that I have
to include the 'HOSTNAME' (localhost). Can anyone see anything wrong with
this code ??
use DBI;
my $database= 'mydatabase@localhost';
my $data_source = "DBI:mysql:$database";
my $username= "username";
my $pa