Jump to content

[HELP] SQL Connection Issue!


Nortonic

Recommended Posts

Hello all. Im working on a Roleplay Server for MTA. Everything is going alright. Ive setup XAMPP, Edited the mysql resource to the connection info, But im getting this error...

[2013-08-24 21:32:08] ERROR: mysql\connection.lua:16: attempt to call global 'mysql_connect' (a nil value)

[2013-08-24 21:32:08] ERROR: mysql\connection.lua:62: attempt to call global 'mysql_ping' (a nil value)

[2013-08-24 21:32:08] ERROR: call: failed to call 'mysql:query' [string "?"]

[2013-08-24 21:32:08] ERROR: mysql\connection.lua:62: attempt to call global 'mysql_ping' (a nil value)

[2013-08-24 21:32:08] ERROR: call: failed to call 'mysql:query' [string "?"]

[2013-08-24 21:32:08] ERROR: mysql\connection.lua:62: attempt to call global 'mysql_ping' (a nil value)

[2013-08-24 21:32:08] ERROR: call: failed to call 'mysql:query' [string "?"]

[2013-08-24 21:32:08] ERROR: mysql\connection.lua:62: attempt to call global 'mysql_ping' (a nil value)

[2013-08-24 21:32:08] ERROR: call: failed to call 'mysql:query' [string "?"]

[2013-08-24 21:32:09] ERROR: mysql\connection.lua:62: attempt to call global 'mysql_ping' (a nil value)

[2013-08-24 21:32:09] ERROR: call: failed to call 'mysql:query' [string "?"]

[2013-08-24 21:32:09] ERROR: mysql\connection.lua:62: attempt to call global 'mysql_ping' (a nil value)

[2013-08-24 21:32:09] ERROR: call: failed to call 'mysql:query' [string "?"]

[2013-08-24 21:32:09] ERROR: mysql\connection.lua:62: attempt to call global 'mysql_ping' (a nil value)

[2013-08-24 21:32:09] ERROR: call: failed to call 'mysql:query_fetch_assoc' [string "?"]

[2013-08-24 21:32:09] ERROR: mysql\connection.lua:62: attempt to call global 'mysql_ping' (a nil value)

[2013-08-24 21:32:09] ERROR: call: failed to call 'mysql:query' [string "?"]

[2013-08-24 21:32:09] Please wait...

[2013-08-24 21:32:09] ERROR: mysql\connection.lua:62: attempt to call global 'mysql_ping' (a nil value)

[2013-08-24 21:32:09] ERROR: call: failed to call 'mysql:query' [string "?"]

[2013-08-24 21:32:09] ERROR: mysql\connection.lua:62: attempt to call global 'mysql_ping' (a nil value)

[2013-08-24 21:32:09] ERROR: call: failed to call 'mysql:query_free' [string "?"]

[2013-08-24 21:32:09] ERROR: mysql\connection.lua:62: attempt to call global 'mysql_ping' (a nil value)

[2013-08-24 21:32:09] ERROR: call: failed to call 'mysql:query' [string "?"]

heres the SQL connection.lua

-- connection settings 
local hostname = "localhost" 
local username = "root" 
local password =  "" 
local database = "mta" 
local port = tonumber( get( "port" ) ) or 3306 

Says the Error is in Line 62.. here it is..

function ping() 
    if (mysql_ping(MySQLConnection) == false) then 
        -- FUU, NO MOAR CONNECTION 
        destroyDatabaseConnection() 
        connectToDatabase(nil) 
        if (mysql_ping(MySQLConnection) == false) then 
            logSQLError() 
            return false 
        end 
        return true 
    end 
  
    return true 
end 

Any help is appriciated! Thanks in advance!

Would it be the mysql module? Or.. MTA EXE or MTA's new DLL's?

Link to comment

If you got 64 bits.

Go redownload the mta_mysql + lib_mysql and sha all .dll

Then put it in modules folder,

load@mtaconfig.

Then, if you started server do /loadmodule sha.dll and then /loadmodule mta_mysql.dll /loadmodule lib_mysql.dll It should work then

Link to comment
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...