in reply to DBI, DBD::MySQL, Apache & Cygwin

Well, apparently the mysql is on the local host, so you do not need to put in the location. Try this and it should work:

my $dsn = 'DBI:mysql:fad'; my $db_user_name = '[username]'; my $db_password = '[pass]'; my $dbh = DBI->connect($dsn, $db_user_name, $db_password);


Cameron

Replies are listed 'Best First'.
Re^2: DBI, DBD::MySQL, Apache & Cygwin
by rvosa (Curate) on Sep 03, 2004 at 00:04 UTC
    Thanks for your reply, but no... The setup is like this:
    • Windows runs MySQL
    • Cygwin runs perl and apache
    I can't leave the IP address of the MySQL server unspecified or set to localhost, because then DBD::mysql will try to connect to it through /tmp/mysql.sock, which doesn't exist (remember, it's a windows version of MySQL, so no UNIX sockets...).

    Thanks again though!