Lua
.
.
.
.
.
.
.
.
.
.
local cFunc = {}
-- MySQL Settings --
local mysqlhost = "Zensiert"
local mysqluser = "Zensiert"
local mysqlpw = "auch Zensiert"
local mysqldatabase = "nochmal Zensiert"
-- Secondary Connection, if connection 1 doesn't work --
local mysqlhost2 = "Zensiert"
local mysqluser2 = "Zensiert"
local mysqlpw2 = "Zensiert"
local mysqldatabase2 = "Zensiert"
gGamemode_name = "mtrpg"
dbpTime = 5000 -- How many Miliseconds will use the dbPoll function for waiting for a result
gServerip = getServerConfigSetting ("serverip")
if not(gServerip) or (gServerip == "") then gServerip = "127.0.0.1" end
gServerport = getServerPort()
gServerpassword = getServerPassword()
handler = mysql_connect ( mysqlhost, mysqluser, mysqlpw, mysqldatabase )
dbhandler = dbConnect("mysql", "dbname="..mysqldatabase..";host="..mysqlhost, mysqluser, mysqlpw, "autoreconnect=1")
if not(handler) then outputServerLog("Can't connect to MySQL Host "..mysqlhost..", User: "..mysqluser..", Password: "..mysqlpw..", Database: "..mysqldatabase.."\nTrying second host.")
handler = mysql_connect ( mysqlhost2, mysqluser2, mysqlpw2, mysqldatabase2 )
dbhandler = dbConnect("mysql", "dbname="..mysqldatabase2..";host="..mysqlhost2, mysqluser2, mysqlpw2, "autoreconnect=1")
if not(handler) then
outputServerLog("Can't Connect to MySQL Secondary host, because Host 1 doesn't work! Shutting down...")
stopResource(getResourceFromName(gGamemode_name))
end
end
Alles anzeigen
in Zeile 36 soll ein Fehler sein
Spoiler anzeigen
2013-05-07 11:10:41] ERROR: [gamemodes]/mtrpg/server/CSettings.lua:36: dbConnect failed; Can't connect to local MySQL server through socket '' (111)
Ich hoffe jemand weiß woran es liegt