in reply to Re: Re: DBI connection to a remote host
in thread DBI connection to a remote host

This is because the access rights to the database do not allow this connection - you will have to alter this at the MySQL server: you can find out more here

/J\

  • Comment on Re: Re: Re: DBI connection to a remote host

Replies are listed 'Best First'.
Re: Re: Re: Re: DBI connection to a remote host
by hmerrill (Friar) on Apr 29, 2004 at 12:23 UTC
    gellyfish is right - and good link to a good explanation on the mysql website. MySQL can be a btch to get working in the beginning - the authentication takes a while to get right.

    *Before* trying to connect to a remote server with DBI/DBD::mysql, get the connection working first just with the mysql client. It's been too long since I've worked with MySQL, but here is the general jist:

    # mysql -u <your-user> -p <remote-database-name> "-p" says to ask you for the password, so you'll get a prompt to enter the password for user <your-user>.
    If it succeeds, you'll get some "connected" message, and a 'mysql>' prompt. Then you can enter mysql commands at that prompt, like these:
    mysql> select * from <table in remote-database-name>;
    Once you can connect from the client machine to the server machine using the 'mysql' client, *THEN* move on to trying to connect using Perl/DBI/DBD::mysql.

    HTH.