Thanks for the help it seemed to have worked. But now I get a different
error.  I am getting to the server but I am getting error:

>From Database server

Found old style password for user 'webuser'. Ignoring user. (You may want to
restart using --old-protocol)

**************************************************

The web server is saying::

DBI->connect(database=cars;host=server1.domain.com) failed: Access denied
for user2: 'server1.domain.com' (Using password: YES) at /www

I have upgraded to DBI.pm to 1.18 on the web server am I missing something.


Jason


-----Original Message-----
From: Bill Adams [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 24, 2001 1:10 PM
To: Jason Whitlow
Cc: '[EMAIL PROTECTED]'
Subject: Re: Connecting to a remote database.


Jason Whitlow wrote:

> Sorry for for the dumb question buuuuuuut.
>
> I have been connecting to a database on my localhost using perl's DBI.pm
>
> This is how I currently do it.
>
> use DBI;
> $data = "databasename";
> $driver = "DBI:mysql";
> my $dbh = DBI->connect("$driver:database=$data", "username", "password")
>         or die "Can't connect";
>
> How would I connect to the same database on a remote server.

>From the top of 'man DBD::mysql':
           use DBI;


           $driver = "mysql";
           $dsn =
"DBI:$driver:database=$database;host=$hostname;port=$port";


You can also do $dbh= DBI->connect( "dbi:mysql:$db;host=$host", ...);

b.


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to