local connection = nil
function connect( )
connection = dbConnect( "mysql", "dbname=aboudmdb;host=***HOST IP***;port=3306;unix_socket=/var/run/mysqld/mysqld.sock", "USERNAME", "PASSWORD", "share=1" )
if connection then
outputConsole ( "Server is now connected with the MySQL database!", 1 )
return true
else
outputConsole ( "Connection with the MySQL database failed!", 1 )
return false
end
end
addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), connect )
try this