On Thu, Feb 14, 2002 at 01:05:24PM -0500, Richard C Rossy wrote:
>  
> Ok I can't seem to get this. Now is it possible to have MySQL on a other
> computer and run the script.
> In other words  the perl script is on foo.com and MySQL database is on
> foo2.com. What is need to make the script work. What I have in the
> script is:

Have you actually read the perl docs for DBI?

       DBI Class Methods

       ...

       connect

             $dbh = DBI->connect($data_source, $username, $password)
                       or die $DBI::errstr;

       ...

           Examples of $data_source values are:

             dbi:DriverName:database_name
             dbi:DriverName:database_name@hostname:port
             dbi:DriverName:database=database_name;host=hostname;port=port

           There is no standard for the text following the driver
           name. Each driver is free to use whatever syntax it
           wants.

So - compare the documentation with what your effort was, and note
the difference:

> $dbh = DBI->connect("DBI:mysql:$mysqldatabase",
> "$mysqlhost","$mysqlusername", "$mysqlpassword") || die("Couldn't
> connect to database!\n");

-- 
Brian 'you Bastard' Reichert            <[EMAIL PROTECTED]>
37 Crystal Ave. #303                    Daytime number: (603) 434-6842
Derry NH 03038-1713 USA                 Intel architecture: the left-hand path

---------------------------------------------------------------------
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