in reply to DBD MySQL connect problem.

Are you attempting to connect from the machine the databases are on? If so, you probably are attempting to use sockets. You might have to set a different socket in the my.cnf for the second server as well as in your connect statement. If you aren't, then you're missing the hostname parameter in your connect() statement.

Also, I may be wrong, but the authentication methods changed between 4.0.? and 4.1.? - meaning you might have to recompile DBD::mysql to get it to work right. (I had a devil of a time getting this to work as I wanted, but I was new at the time.)

------
We are the carpenters and bricklayers of the Information Age.

Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose

I shouldn't have to say this, but any code, unless otherwise stated, is untested

Replies are listed 'Best First'.
Re^2: DBD MySQL connect problem.
by shemp (Deacon) on Aug 16, 2004 at 17:46 UTC
    Update At End

    Yes, i am connecting from the machine that the MySQL servers are located on. I do have different sockets & pidfiles for the different servers.

    So i shouldnt have to set the host param in connect() - both connections are to the local machine.

    I've never seen anything about setting the socket in the DBI connect statement, is this something that can be done? What effects might it have?

    If i do recompile the DBD::mysql, then will it stop working for the 4.0.2 server? I have read a bit about the changes, but whether i can get both to work at the same time is another story. Perhaps i'll need both DBD::mysql's installed, and put the new one somewhere else, and use both from my script.

    Hope this helps clarify things. Any other questions, This is all im working on until its done!

    Thanks much!

    Update:
    Ok, i trield setting the socket explicitly with:
    mysql_socket=<...>
    And now i get a more meaningful error:
    ...failed: Client does not support authentication protocol requested by server; consider upgrading MySQL client at...
    So now with the socket specified, it appears that its a DBD version problem, which i should be able to take care of. (i hope)