JR10 Posted August 16, 2011 Share Posted August 16, 2011 Here is what happens: I downloaded ml_mysql.dll I run the server a window appears saying libmysql.dll is missing. Downloaded it, and when I run the server says unable to find libmysql.dll, but ml_mysql runs this time successfully. Next I made a test script whenever I use mysqlOpen My server crashes. Even used the exact same example on wiki, but changed the username and pass. function onMySQLOpen ( result ) if ( result ) then outputServerLog ( "MySQL connection established." ) else outputServerLog ( "MySQL connection failed." ) end end db = mysqlCreate () mysqlOpen ( db, "onMySQLOpen", "localhost", "test", "test", "jr10test", 3306 ) First time I use mysql. Windows 7. EDIT: there is not problems with the arguments, I used xamp, made a full Privileges user name: test password: test. I made a database with the name jr10test. EDIT: i found libmysql.dll in mabako mta paradise, just took it. Link to comment
AeroXbird Posted August 16, 2011 Share Posted August 16, 2011 libmysql.dll should go with the server .exe not in modules. Link to comment
JR10 Posted August 16, 2011 Author Share Posted August 16, 2011 Done, but now it doesn't find it, and give me the message that it's missing. EDIT: I just checked MTA - Paradise, there it's not added to mtaserver.conf as a module. And if I do that, it says it's missing. Link to comment
qaisjp Posted August 16, 2011 Share Posted August 16, 2011 Indeed. I just added it to modules in the mtaserver.config, it says it fails to run, but the server runs smoothly. If you dont' add libmysql to it, it will abort the server. Link to comment
JR10 Posted August 16, 2011 Author Share Posted August 16, 2011 Now I know where to put it, MTA Directory\server\libmysql.dll handler = mysql_connect("localhost", "test", "test", "jr10test") -- Establish the connection if ( not handler ) then -- The connection failed outputDebugString("Unable to connect to the MySQL server") else local result = mysql_query(handler, "CREATE TABLE IF NOT EXISTS Test (TEST NUMBER,NAME TEXT)") if (not result) then outputDebugString("Error executing the query: (" .. mysql_errno(handler) .. ") " .. mysql_error(handler)) else mysql_free_result(result) -- Freeing the result is IMPORTANT result = mysql_query(handler, "SELECT * FROM Test") end end I tried this, and it gives me syntax error. Link to comment
CapY Posted August 16, 2011 Share Posted August 16, 2011 (edited) Jacob have problems for the first time Reinstall a server or MTA and that's it , just store somewhere config, modules and resources ( if needed ) Edited August 16, 2011 by Guest Link to comment
qaisjp Posted August 16, 2011 Share Posted August 16, 2011 Jacob have problems for the first time offtopic pl0x? Link to comment
JR10 Posted August 16, 2011 Author Share Posted August 16, 2011 Reinstall a server or MTA and that's it , just store somewhere config, modules and resources ( if needed ) That's is not the problem, the server doesn't crash any more. The example I posted just don't work. Link to comment
qaisjp Posted August 16, 2011 Share Posted August 16, 2011 Meh, you wanna do some teamviewer work? it'll be much easier. Link to comment
qaisjp Posted August 17, 2011 Share Posted August 17, 2011 You removed your PM. Add me to: qaispatankar (hotmail.co.uk) 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