in reply to Re^2: DBD::mysql installation
in thread DBD::mysql installation

Anonymous Monk,
Maybe - came to me as I was waking up this morning. I remember a handful of minor annoyances when I tried following those instructions to include the header file. As it turned out, I had installed MySQL server (Windows version) and it comes with its own client libraries. The wrong client libraries (Windows) were in the path prior to the Cygwin.

Your comment concerning the mysqlclient.lib troubles me. It shouldn't be looking for a .lib extension. Are you sure you are pointing to the Cygwin built client library? Believe it or not, the Windows MySQL Server installation comes with shell scripts. If the perl Makefile.PL finds that script instead of the Cygwin client script, it will assume the wrong configuration information. It took me a while to find this.

Cheers - L~R

Replies are listed 'Best First'.
Re^4: DBD::mysql installation
by Anonymous Monk on Apr 07, 2005 at 14:52 UTC
    Well, I don't see any other mysql libraries except the ones that came with MySQL. I looked for them in the Cygwin installation tool, but didn't see any. As for the .lib file, that's just what I assumed looking at the option that failed. (-lmysqlclient). I do have the libmysql.dll, libmysql.lib, etc. in the path. As for the script you're talking about, I'm guessing that's the mysql_config script? If so, I found it, and I placed it in the same directory as the makefile.PL file. It wouldn't find it before. I also tried to edit this to make sure that the paths were correct because in that script, all of the paths were UNIX paths.
      Anonymous Monk,
      Ok, what is unclear to me at this point is what you mean by the mysql libraries except the ones that came with MySQL. There are two main ways one might use DBD::MySQL - to connect to a local database or to connect to a remote database.

      In the case of the former (MySQL server on local box), you end up with MySQL client as a bi-product. You need to compile your own client libraries inside of Cygwin and ensure that the Windows installed one doesn't come into play.

      In the case of the latter (no local MySQL database), you only need to compile the MySQL client libraries within Cygwin (and not the server as reports are this doesn't work). There shouldn't be a path or version issue since it is the only one present.

      It isn't clear to me which of these two you are doing. I only did the first method I described.

      Cheers - L~R

        I have the client libraries that came with the windows version of MySQL. Does this mean that I have to recompile MySQL in it's entirety under Cygwin? Or is there an option to only compile the client libs?

        Btw: Thanks for the help. Not really the answer I was hoping for, but it looks to be the answer I need.
        Just got it to work. I decided to look in to compiling the source for mysql on windows in Cygwin and got the right client libraries this time. Thanks for your help.