=KoG=Rouche Posted November 19, 2013 Share Posted November 19, 2013 (edited) Hi all, I'm trying to use MySQL Database for my scripts but ... i got some problems. I followed the MTA Wiki (https://wiki.multitheftauto.com/wiki/Modules/MTA-MySQL). My server is Running on Debian 64bits, service MySQL, Apache2 and Phpmyadmin has been installed successfully (it works fine). I added the librairies as asked in MTA Wiki ! I created a folder "modules" in /mta/mods/deathmatch/ and added mta_mysql.so in it. In the meta i added this line : Here is the error i get with /debuscript 1 on my server : In MTA Server Logs i can see this line : Line 8522: [2013-11-18 23:22:44] MODULE: Unable to find modules/mta_mysql.so (libmysqlclient.so.15: Ne peut ouvrir le fichier d'objet partagé: Aucun fichier ou dossier de ce type)! So i installed the "libmysqlclient.so.15" ! It doesn't work ... Can someone help me ? Here is my code (I think the problem is not from the code) : -- Default host = "127.0.0.1" -- Database Host username = "admin" -- Database Username password = "adminpassword" -- Database Password db = "mta_db" -- Database ( Where you got your tables ) handler = mysql_connect( host, username, password, db) -- Establish the connection if ( not handler ) then -- The connection failed outputDebugString("Unable to connect to the MySQL server") else mysql_close(handler) -- Close the connection end Edited November 30, 2013 by Guest Link to comment
TrapLord Studios™ Posted November 21, 2013 Share Posted November 21, 2013 You haven't placed your modules correctly one, or two, you haven't downloaded the second vital module that should be placed in C:\Program Files (x86)\MTA San Andreas 1.3\server - Your MTA Server folder. If you need further help add me on Skype : avindean6 Link to comment
xXMADEXx Posted November 21, 2013 Share Posted November 21, 2013 You should use the default MTA database functions. https://wiki.multitheftauto.com/wiki/Se ... _functions Really the only reason people now use the MySQL module is for vG scripts. (As far as I know, the MySQL Module only works on a 32-bit operating system.) Link to comment
tosfera Posted November 21, 2013 Share Posted November 21, 2013 You should use the default MTA database functions.https://wiki.multitheftauto.com/wiki/Se ... _functions Really the only reason people now use the MySQL module is for vG scripts. (As far as I know, the MySQL Module only works on a 32-bit operating system.) As a starter, you should use the default db functions. Why? Cause they are protected against mysql injections and that kind of stuff, if you want to take a step higher and want to take the risk to get injections; use the mysql module. I'd go for the mysql module cause of the less limitations in the queries. But it's alot less safe. Link to comment
=KoG=Rouche Posted November 21, 2013 Author Share Posted November 21, 2013 Is there any chance to have an upgrade for 64bits version ? Link to comment
Gallardo9944 Posted November 28, 2013 Share Posted November 28, 2013 dbConnect works flawlessly, use it. Link to comment
=KoG=Rouche Posted November 30, 2013 Author Share Posted November 30, 2013 I used this topic to resolve this. (https://forum.multitheftauto.com/viewtopic.php?f=106&t=34979) Thanks anyway Link to comment
myonlake Posted November 30, 2013 Share Posted November 30, 2013 I'd go for the mysql module cause of the less limitations in the queries. But it's alot less safe. Or then you can make your own wrapper functions on top of default database functions and then extend the abilities of the default functions so that they're close to the module's functions and features. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now