Problem whit mysql 5.6

07/29/2014 16:50 lizzes#1
Help i use mysql 5.6 and cant found its..



function give_md(z)
os.execute("mysql -uroot -pM22 account --execute='UPDATE account SET coins = coins + ".. z .." WHERE id = ".. pc.get_account_id() ..";'")
os.execute("mysql -uroot -pM22 log --execute='INSERT INTO mds_log (account_id, player_id, coins, fecha) VALUES (".. pc.get_account_id() ..", ".. pc.get_player_id() ..", ".. z ..", NOW());'")
end
mysql_query = function(query)
if not pre then
local rt = io.open('CONFIG','r'):read('*all')
pre,_= string.gsub(rt,'.+PLAYER_SQL:%s(%S+)%s(%S+)%s(%S+) %s(%S+).+','-h%1 -u%2 -p%3 -D%4')
end
math.randomseed(os.time())
local fi,t,out = 'mysql_data_'..math.random(10^9)+math.random(2^4,2 ^10),{},{}
--os.execute('mysql '..pre..' --e='..string.format('%q',query)..' > '..fi) -- für MySQL51
os.execute('mysql '..pre..' -e'..string.format('%q',query)..' > '..fi) -- für MySQL55
for av in io.open(fi,'r'):lines() do table.insert(t,split(av,'\t')) end; os.remove(fi);
for i = 2, table.getn(t) do table.foreach(t[i],function(a,B)
out[i-1] = out[i-1] or {}
out[i-1][a] = tonumber(B) or b or 'NULL'
out[t[1][a]] = out[t[1][a]] or {}
out[t[1][a]][i-1] = tonumber(B) or b or 'NULL'
end) end
return out
end
function split(str, delim, maxNb)
if str == nil then return str end
if string.find(str, delim) == nil then return { str } end
if maxNb == nil or maxNb < 1 then maxNb = 0 end
local result = {}
local pat = "(.-)" .. delim .. "()"
local nb = 0
local lastPos
for part, pos in string.gfind(str, pat) do
nb = nb + 1
result[nb] = part
lastPos = pos
if nb == maxNb then break end
end
if nb ~= maxNb then result[nb + 1] = string.sub(str, lastPos) end
return result
end



not found execute and mysql_query not found too..
07/29/2014 19:15 xVanilla94#2
For os.execute you'll have to add
os.execute
to your quest_functions file. mysql_query relies on os.execute in your implementation.
07/29/2014 20:32 lizzes#3
But yes add, in 5.5 found 100% but in 5.6 not found..
07/30/2014 00:03 [SL]Pertatofix#4
Mysql 5 5 is for Metin2 better.
07/30/2014 00:59 xVanilla94#5
No mysql 5.6 works fine. Please give a more detailed error report. Tell us what's the output in your console when the error occurs and what's written in the syserr file.
you can just quote it so we can have a better understanding of the error.
07/30/2014 22:38 lizzes#6
I formatted the dedicated and put mysql 5.5 but still not working any suggestions?