in reply to Re: Re: Re: DBI connection to a remote host
in thread DBI connection to a remote host
*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:
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 -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>.
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.mysql> select * from <table in remote-database-name>;
HTH.
|
|---|