Liberty Unleashed
Scripting => Module Releases => Topic started by: stormeus on November 19, 2011, 07:21:39 am
-
MySQL ( lu_mysql )
This is a re-release of Juppi's lu_mysql module, which was never formally released. The module would allow you to connect to any MySQL database on any server, unlike SQLite, which restricts you to databases in the server folder. This module can allow you to update stats on a website, while maintaining another database on your server.
The only difference between this and Juppi's original code is a courtesy loading message, two more exceptions for connection failures, and it's been recompiled to work properly. The original module seemed to not compile correctly, and trying to use it would always result in a "Failed to retrieve UserData"
All the credit should go to Juppi for coding the vast majority of this great module. The list of functions provided are:
- mysql_connect( szHost, szUsername, szPassword, szDatabase, iPort )
- mysql_close( pConnection )
- mysql_query( pConnection, szQuery )
- mysql_num_rows( pResult )
- mysql_num_fields( pResult )
- mysql_fetch_row( pResult )
- mysql_fetch_assoc( pResult )
- mysql_fetch_lengths( pResult )
- mysql_free_result( pResult )
- mysql_errno( pConnection )
- mysql_error( pConnection )
- mysql_ping( pConnection )
- mysql_escape_string( pConnection, szString )
- mysql_select_db( pConnection, szDatabase )
- mysql_change_user( pConnection, szUser, szPassword )
- mysql_warning_count( pConnection )
- mysql_affected_rows( pConnection )
- mysql_insert_id( pConnection )
- mysql_info( pConnection )
Some functions are already on the wiki (http://liberty-unleashed.co.uk/LUWiki/Modules/Squirrel/lu_mysql).
Installation
Extract lu_mysql.dll/so to your Modules folder, and libmysql.dll to the same folder as the server (if you're using Windows). Load the module and you should be good to go.
Download
Windows Binary (http://adtec.vrocker-hosting.co.uk/f/1/lu_mysql.win.zip)
Linux Binary (https://lu-modules.googlecode.com/files/lu_mysql.linux.zip) (MySQL 5.1)
Linux Binary (https://lu-modules.googlecode.com/files/lu_mysql55.linux.zip) (MySQL 5.5)
Source Code (https://code.google.com/p/lu-modules/source/browse/#svn%2Ftrunk%253Fstate%253Dclosed)
-
Perfect, just perfect ! Big thank. ;)
-
Linux Version: Here (link removed) (http://about:blank)
Compiled using the source code in the first post and the Makefile from Juppi's original source.
- AdTec_224
-
Cool. My compiler isn't working properly, I'll add that link to the first post. Also, I'll try fixing the multi-row bug and compiling against Linux once I clear that up.
-- EDIT --
Updated
- Fixed the module so that multiple rows don't push arrays of null. Should work properly, since it's a one-line fix.
- Compiled against g++ for Linux. GCC wasn't good enough.
- Removed a debug message I accidentally left in.
Links are in the first post. Bug reports and mirrors always appreciated.
-
- Fixed the module so that multiple rows don't push arrays of null. Should work properly, since it's a one-line fix.
Thanks alot, I couldn't find the error myself :)
-
Mr.Storm can this be used with VCMP Squirrel?
-
Mr.Storm can this be used with VCMP Squirrel?
Try it at least. I think it will work too.
-
Mr.Storm can this be used with VCMP Squirrel?
Yes. Tested and works. LU and VC:MP modules are (for the most part) cross-compatible.
-
Mr.Storm can this be used with VCMP Squirrel?
Yes. Tested and works. LU and VC:MP modules are (for the most part) cross-compatible.
Thank you Mr.Storm
-
Can someone upload Windows Binary using this (http://uploading.com/)
Most of all sites are currently blocked by my ISP for some reasons.
-
Mediafire is blocked by your ISP?!
What crappy ISP do you have? o_O
here it is anyways: lu_mysql.win.zip - 802.0 KB (http://uploading.com/files/8d77d6c7/lu_mysql.win.zip/)
-
Mediafire is blocked by your ISP?!
All popular Downloadable sites are blocked because a movie produced by them is going to get released today (Don 2).
lu_mysql.win.zip - 802.0 KB ([url]http://uploading.com/files/8d77d6c7/lu_mysql.win.zip/[/url])
Thanks
-
a movie is going to be released, so they block all download sites? crap, what country do you live in man...
-
They are probably trying to prevent network overload by being ***holes and not upgrading their stuff, but instead blocking any heavy traffic.
-
a movie is going to be released, so they block all download sites? crap, what country do you live in man...
this sounds like straight communism
-
a movie is going to be released, so they block all download sites? crap, what country do you live in man...
Post-SOPA America.
-
Sorry for the bump, but can anyone please re-up it?
-
Linux: http://dl.dropbox.com/u/15204202/lu_mysql.linux.zip (http://dl.dropbox.com/u/15204202/lu_mysql.linux.zip)
Windows: http://dl.dropbox.com/u/15204202/lu_mysql.win.zip (http://dl.dropbox.com/u/15204202/lu_mysql.win.zip)
Source: http://dl.dropbox.com/u/15204202/mysql.zip (http://dl.dropbox.com/u/15204202/mysql.zip)
-
Thanks. In case those links expire again, here's one that (probably) never will:
ftp://ftp.vicelegends.com/Scriptfiles/Modules/MySQL
edit:// Stormeus, can you please make a release build? The (as it seems) current build is giving me the annoying MSVCR100D.dll error and installing the 2k10 runtimes didn't do me any good.
-
edit:// Stormeus, can you please make a release build? The (as it seems) current build is giving me the annoying MSVCR100D.dll error and installing the 2k10 runtimes didn't do me any good.
Ya...that would be caused by a debug build. VRocker made that mistake once with the test builds for the Testers. xD
-
I will do it tomorrow, if stormeus havent already done it by then ofc :P
-
Not sure if it works, but try this: https://dl.dropbox.com/u/15204202/lu_mysql.dll
-
Crashes. :\
-
See if these are any good:
http://code.google.com/p/lu-modules/downloads/list (http://code.google.com/p/lu-modules/downloads/list)
-
Extremely sorry for the bump! I can't get this to work i think have done everything right but i get an error saying MSVCR100D.dll is missing from your computer. I tried installing the .dll file (through it already exist, overwrited) but still the same. I tried Thijin's link now the Module functions aren't working. Same .dll error when trying Stromeus link. Waiting for help.
-
It only works for me if I have the MSVCR100D.dll file in my main server directory.
-
It only works for me if I have the MSVCR100D.dll file in my main server directory.
Not for me. I really need this module. Someone help meh please!
-
For anyone else getting the file error:
http://forum.liberty-unleashed.co.uk/index.php/topic,1725.0.html (http://forum.liberty-unleashed.co.uk/index.php/topic,1725.0.html)
-
That error appears because whoever compiled the latest module compiled a debug build, and you can only run it if you have Visual Studio installed (or you can download the debug runtime dll and put it in your server folder however that is NOT recommended).
The solution is to re-build the module in release mode, I'm unfortunately away for the time being and dont have access to a pc with Visual Studio installed, so I'm hoping another dev/tester could perhaps compile and upload the module?
-
http://adtec.vrocker-hosting.co.uk/f/1/lu_mysql.win.zip (http://adtec.vrocker-hosting.co.uk/f/1/lu_mysql.win.zip) compiled in VS2008 Release build using the source code from Thijns dropbox link since i assume thats the most up to date source.
-
compiled in VS2008 Release build using the source code from Thijns dropbox link since i assume thats the most up to date source.
As long as it was made on or after 19 Nov. 2011, it should be fine. Anything before that is susceptible to errors when trying to select multiple rows.
-
I believe all the links in the Wiki and here have been updated. Whatever updated ones Stormeus posted to update them since, I updated on the Wiki too.
-
Sorry for the bump, but i have server problems with the lu_mysql.so for linux.
AN ERROR HAS OCCURED [getVarInfo: Could not retrieve UserData]
I put everything perfectly, indeed, on my pc works 100% but linux does not. I have tried all, apt-get update, upgrade, aptitude, reinstall the os... but nothing. Maybe i miss a lib or something. I use Debian 7 with the latest updates, same as MySQL.
-
Sorry for the bump, but i have server problems with the lu_mysql.so for linux.
AN ERROR HAS OCCURED [getVarInfo: Could not retrieve UserData]
I put everything perfectly, indeed, on my pc works 100% but linux does not. I have tried all, apt-get update, upgrade, aptitude, reinstall the os... but nothing. Maybe i miss a lib or something. I use Debian 7 with the latest updates, same as MySQL.
Ah yes. That very annoying, generic error. It happens on Windows, too, for a variety of reasons. Usually it's related to a database error, or a problem with the code.
-
Do doing print( LoadModule("lu_mysql") );
If that prints false, the module isn't loading properly.
Are you running 32 or 64 bit?
You might wanna try compiling the module on your own box.
-
Hi, Thijn. Returns false. I using x32-Bit.
-
Sorry for the bump, but i have server problems with the lu_mysql.so for linux.
AN ERROR HAS OCCURED [getVarInfo: Could not retrieve UserData]
I put everything perfectly, indeed, on my pc works 100% but linux does not. I have tried all, apt-get update, upgrade, aptitude, reinstall the os... but nothing. Maybe i miss a lib or something. I use Debian 7 with the latest updates, same as MySQL.
So you want to use a .dll for linux...
-
So you want to use a .dll for linux...
Wrong
.DLL files are for Windows, and .SO files are for Linux.
-
So you want to use a .dll for linux...
Wrong
.DLL files are for Windows, and .SO files are for Linux.
I know that.... I was being sarcastic
-
Plugin updated.
Windows users do not need to re-download the module. Linux users who are using libmysqlclient16 (MySQL 5.1) and/or have not had any issues with the module do not need to update.
The problem with Debian 7 is that it was updated to use the MySQL 5.5 (libmysqlclient18) libraries instead of libmysqlclient16 as was done with earlier builds, and as a result, MySQL functions could not be linked at runtime.
A MySQL 5.5 version has been added for download. Anyone using MySQL 5.5 on Linux and has encountered issues loading the module is encouraged to use it.
MySQL 5.5 binary (Linux x86)
https://lu-modules.googlecode.com/files/lu_mysql55.linux.zip
-
Many thank you very much, stormeus, the module works perfectly now without any problem on. Thanks also to people who tried to help me in the problem, as SugarD, Thijn and Vortrex.
-
The module doesn't work at CentOS x64 :( (Could not retrieve UserData)
Can someone compile it for 64-bit linux?
-
There's no 64bit LU server available so a 64bit module would be useless. You're probably missing some dependencies (make sure you have the 32bit versions installed). Try 'ldd lu_mysql.so', it should tell you what youre missing.
-
Try 'ldd lu_mysql.so'
libmysqlclient.so.18 => not found
Can't it work with libmysqlclient.so.16 ?
I can't find libmysqlclient.so.18 for CentOS(
-
Just symlink your libmysqlclient.so.16 to libmysqlclient.so.18
-
Oh, I'm install 32-bit mysql-libs from Remi repo and now module works :D
Thank you :)
-
Glad you fixed it :)
-
I've updated by myself the MySQL connector to 6.1.6 version.
Win32: https://github.com/Ankris/lu_mysql/blob/master/bin/lu_mysql.dll
- libmysql.dll (Win32): https://github.com/Ankris/lu_mysql/blob/master/bin/libmysql.dll
Linux: https://github.com/Ankris/lu_mysql/blob/master/bin/lu_mysql.so
Github repo: https://github.com/Ankris/lu_mysql
-
I've updated myself the MySQL connector to 6.1.6 version.
Win32: https://github.com/Ankris/lu_mysql/blob/master/bin/lu_mysql.dll
- libmysql.dll (Win32): https://github.com/Ankris/lu_mysql/blob/master/bin/libmysql.dll
Linux: https://github.com/Ankris/lu_mysql/blob/master/bin/lu_mysql.so
Github repo: https://github.com/Ankris/lu_mysql
Nice work!