#19 Failed to load external library "libmysql"

closed-works-for-me
None
5
2007-07-03
2007-06-29
John Manley
No

Configuration:
Windows/XP Pro
MySQL 5.0.41-community-nt
Rexx/SQL 2.5
ooRexx

As instructed, I tried to run the following:
rexxmy simple.cmd user=... pass=... data=...
Received the following error message:
Failed to load external library "libmysql"; LoadLibrary() failed:

John

Discussion

  • Mark Hessling

    Mark Hessling - 2007-06-29

    Logged In: YES
    user_id=86185
    Originator: NO

    Do you have libmysql.dll; usually in the MySQL "bin" directory. If you do have it, is the MySQL "bin" directory in the PATH environment variable?

     
  • Mark Hessling

    Mark Hessling - 2007-06-29
    • assigned_to: nobody --> rexx
     
  • John Manley

    John Manley - 2007-06-29

    Logged In: YES
    user_id=1831407
    Originator: YES

    Yes, libmySQL.dll is in the "c:\Program Files\MySQL\MySQL Server 5.0\bin" directory and this path is in the PATH environment. At one point, I even copied all the Rexx/SQL .exe and .dll files into that directory as well, ran rexxmy.exe then ran rexxsql.exe and still got the same error message stated earlier.

     
  • Mark Hessling

    Mark Hessling - 2007-06-29

    Logged In: YES
    user_id=86185
    Originator: NO

    Do you have Regina installed on this machine as well as oORexx?
    If so, then try the following:

    In a console window:

    set REXXTRANS_INTERPRETER=oorexx

    then run rexxmy.exe ...

    BTW What does your call to rxfuncadd() look like?

     
  • John Manley

    John Manley - 2007-06-29

    Logged In: YES
    user_id=1831407
    Originator: YES

    I did have Regina installed (as well as Reginald) but I have just now removed both of them from Windows/XP.

    Here is a clipping from simple.cmd:
    Signal On Syntax
    Parse Arg . 'user=' username . 1 . 'pass=' password . 1 . 'data=' database . 1 . 'serv=' server
    Call RxFuncAdd 'SQLLoadFuncs', 'rexxsql', 'SQLLoadFuncs'
    Call SQLLoadFuncs

    I ran rexxmy.exe with the same result. (I also did as you'd suggested: "set REXXTRANS_INTERPRETER=oorexx", prior to running rexxmy.

     
  • John Manley

    John Manley - 2007-06-29

    Logged In: YES
    user_id=1831407
    Originator: YES

    I was doing some web searches just now and ran across some sites that speak to similar problems. I don't know if they're relevant:
    http://www.ozzu.com/ftopic30929.html
    http://bugs.mysql.com/bug.php?id=28358 (this one makes mention of "Starting with MySQL Community Server version 5.0.41, libmysql.dll cannot be dynamically loaded on Windows."

    I'm not sure what these all mean to me. I'm wondering if this in fact is what I'm faced with, and if so, is there a work around?

     
  • Mark Hessling

    Mark Hessling - 2007-06-29

    Logged In: YES
    user_id=86185
    Originator: NO

    The problem is that you are running rexxmy.exe but trying to load SQLoadFuncs. You have two executables, rexxmy.exe and rexxsql.exe, and two DLLs; rexxmy.dll and rexxsql.dll.
    The rexxmy.* contain functions that start with MY: eg MYLoadFuncs().
    The rexxsql.* contain functions that start with SQL: eg SQLLoadFuncs().

    So try running your program with rexxsql.exe.

    See http://rexxsql.sourceforge.net/doc/rexxsql/NOTES.html
    for more details on why this is.

     
  • John Manley

    John Manley - 2007-06-29

    Logged In: YES
    user_id=1831407
    Originator: YES

    rexxsql.exe generates the same error message.

     
  • Mark Hessling

    Mark Hessling - 2007-06-29

    Logged In: YES
    user_id=86185
    Originator: NO

    Having read the bug reports, then yes it does appear that you are facing the same problem. The comments I made earlier still apply once a working MySQL is installed.

    MySQL in their infinite wisdom made some changes to their Windows releases about 6 months ago that resulted in Rexx/SQL failing then (they changed compilers and didn't tell anybody). I had to make major changes to Rexx/SQL to enable their DLL to be dynamically loaded, and now it appears they have broken it again :-(

    According to the bug report, it will be fixed in their next release.

    As far as a workaround is concerned, then there are two:
    1) build your own libmysql.dll
    2) revert back to a previous version of MySQL

    1) is probably not an ideal solution.
    2) might be the better course of action unless you require some feature of that specific version of MySQL.

     
  • John Manley

    John Manley - 2007-06-29

    Logged In: YES
    user_id=1831407
    Originator: YES

    Thanks so much for your help. I'm not sure either option is viable for me. I'll just have to table this project for the time being. I'll have a look at the ubuntu platform and see how far I get there. Thanks again.
    John

     
  • John Manley

    John Manley - 2007-07-02

    Logged In: YES
    user_id=1831407
    Originator: YES

    I couldn't just leave this ticket hanging. As was pointed out, I had two options:
    1) build your own libmysql.dll
    2) revert back to a previous version of MySQL
    I'm not a programmer so the first options is definitely out. But I did try out the second option--downgrade to v4.1. And if anyone's interested, that version worked like a charm. I ran the two rexx scripts that came bundled with Rexx/SQL: 1) simple.cmd and 2) tester.cmd. And I'm pleased to announce that both worked as documented.

    I'm still keen on getting Rexx/SQL to work on my ubuntu system. I've opened a trouble ticket (bug #400536). I'd be very pleased if someone could help me with that one.

     
  • John Manley

    John Manley - 2007-07-02

    Logged In: YES
    user_id=1831407
    Originator: YES

    Correction: the request id of the other problem I opened is 1745659.

     
  • John Manley

    John Manley - 2007-07-03
    • status: open --> closed-works-for-me
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks