in reply to prob with DBD::mysql on Mac OS X

Hm,

it seems that there are some parts missing. So I will go down a checklist here:

If not, please give it a try. This distros worked yet every time for me. Even cross-platform.

/oliver/

Replies are listed 'Best First'.
Re: Re: prob with DBD::mysql on Mac OS X
by neuroball (Pilgrim) on Jan 03, 2004 at 16:06 UTC

    Okay, I re-investigated the problem after it did also show up in one of my mailing lists... and after around 1h or searching on google and bash scripting, I arrived at the following solution.

    it seems that perl can't access some library functions that it needs. Meaning: It doesn't have access to the mysql libraries and/or includes.

    • You might want to do the following:
    • Search for MYSQL, e.g.:
      • sudo find / mysql | grep mysql
    • Depending on where mysql is installed, you get one location for the main file returned. E.g.:
      • /usr/mysql
    • Now... take a look at your PATH, e.g.:
      • set | grep PATH
    • Are the directories for the mysql main directory included in the PATH?
      If not you have two choices:
      1. add the mysql main directory to the path
        • PATH=$PATH:/usr/mysql
      2. add INCLUDE and LIBRARY tags for mysql
        • export MYSQL_INCLUDE="/usr/mysql/include"
        • export MYSQL_LIBRARY="/usr/mysql/lib"

    Hope this helps.

    /oliver/

    Update: Added <code> tags around the "two choices" code snippets.

      Also look @ Net::MySql module for machines which don't have a mysql client installed....
      thanks for your research! sounds reasonable to me. but, it does not work anyway...
      a few more questions you can easily answer me:
      - i do not have to restart the system do i?
      - my mysql is in /usr/local/mysql..../. i tried with the alias (which is /usr/local/mysql) and with the whole path. neither worked. maybe it helps to reinstall mysql to /usr/mysql?

      i tried both ways, the PATH and the export. keep on trying. thanks for your help & patience!
        sorry for the last anonymous post.
        the question for the restart is not considering my acutal prob. (it did not help anyway.) i'm new to *nix-systems and used to restart the system every time i did something special on it (from windows). so the question is more general: when do i have to restart my system? never?