Hello guys, I have some problems because of my fledgling level of english and the technicals english words used in drakehawke’s thread about mysqloo.
As you can see I am trying to connect a database to my server by following all the steps to succeed but unfortunatly I don’t manage to.
So, I downloaded these files : puu.sh/1fhWu and drakehawke-gmod.googlecode.com/svn/trunk/AndyVincentGMod/RELEASE/gmsv_mysqloo_win32.dll
The first file, I put it in the same folder of srcds_
The second file, I put it in garrysmod/lua/bin ( I had to create the folder bin).
After that, I know that I have to connect my database with my private informations but I don’t know where. As it’s said in drakehawke’s thread I have to fill in these lines :
require( "mysqloo" ) local db = mysqloo.connect( "123.456.789.0", "drake", "abc123", "database_name", 3306 ) function db:onConnected() print( "Database has connected!" ) local q = self:query( "SELECT 5+5;" ) function q:onSuccess( data ) print( "Query successful!" ) PrintTable( data ) end function q:onError( err, sql ) print( "Query errored!" ) print( "Query:", sql ) print( "Error:", err ) end q:start() end function db:onConnectionFailed( err ) print( "Connection to database failed!" ) print( "Error:", err ) end db:connect()
But I don’t know where, should I create a new file ? Or edit a file who already exists ?
I must write my private informations in “_MySQL.lua” who is in /garrysmod/gamemodes/darkrp/gamemode ? I don’t know…
Could you help me to go in the right direction ?