Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2016-09-16, 18:46


STOPseba

Emeryt na scenie MTA






Wiek: 25
Na forum: 3771 dni
Posty: 448
Nick w MP: STOPseba

Piwa: 5014

Respekt: 576,3
Respekt: 576,3

Witam mam takie problem z tym kodem:
--[[
    ResourceOURGame v2
    DevelopersSplit <split.programista@gmail.com>
    You have no right to use this code without my permission.
    (c2015 <split.programista@gmail.com>. All rights reserved.
]]

-- Settings
DBHandler=nil
DBName="565153_test"
DBUser="565153"
DBPass="******"
DBHost="sql.pukawka.pl"

-- Functions
function dbSet(...)
    if not {...} then return end
    local stringe=dbPrepareString(DBHandler,...)
    local query=dbExec(DBHandlerstringe)
    return query
end

function dbGet(...)
    if not {...} then return end
    local stringe=dbPrepareString(DBHandler,...)
    local query=dbQuery(DBHandlerstringe)
    local result=dbPoll(query, -1)
    return result
end


addEventHandler("onResourceStart"resourceRoot, function()
    DBHandler=dbConnect("mysql""dbname="..DBName..";host="..DBHost..""DBUserDBPass"share=1;autoreconnect=1")
    if DBHandler then
        outputDebugString("* Connect to server MYSQL...")
        dbSet("SET NAMES utf8")
    else
        outputDebugString("* No Connecting to server MYSQL..")
    end
end)


local SQL_LOGIN="565153"
local SQL_PASSWD="******"
local SQL_DB="565153_test"
local SQL_HOST="sql.pukawka.pl"
local SQL_PORT=3306

local root getRootElement()

local SQL

local function connect()
    SQL=dbConnect("mysql""DBName="..SQL_DB..";host="..SQL_HOST..""SQL_DBUSERSQL_PASSWD"share=1");
    if (not SQLthen
        outputServerLog("BRAK POLACZENIA Z BAZA DANYCH!")
    else
        --mysql_query(SQL,"SET NAMES utf8")
        --outputServerLog("Modul mysql polaczony!")
    end

end


local function keepAlive()
    if (not mysql_ping(SQL)) then
        outputServerLog("Zerwane polaczenie z baza danych, nawiazywanie...")
        connect()
    end
end
addEventHandler("onResourceStart",getResourceRootElement(),function()
    connect()
    setTimer(keepAlive300000)
end)

function esc(value)
    return mysql_escape_string(SQL,value)
end

function pobierzTabeleWynikow(query)
    local result=mysql_query(SQL,query)
    if (not resultthen
        outputDebugString("mysql_query failed: (" .. mysql_errno(SQL) .. ") " .. mysql_error(SQL))
        outputServerLog("mysql_query failed: (" .. mysql_errno(SQL) .. ") " .. mysql_error(SQL))
        return nil
    end
    local tabela={}
    for result,row in mysql_rows_assoc(result) do
        table.insert(tabela,row)
    end
    mysql_free_result(result)
    return tabela
end

function pobierzWyniki(query)
    local result=mysql_query(SQL,query)
    if (not resultthen return nil end
    row mysql_fetch_assoc(result)
    mysql_free_result(result)
    return row
end


function zapytanie(query)
    local result=mysql_query(SQL,query)
    if (resultthen mysql_free_result(result) return true end
    return
end

function insertID()
    return mysql_insert_id(SQL)
end

function affectedRows()
    return mysql_affected_rows(SQL)
end


function fetchRows(query)
    local result=mysql_query(SQL,query)
    if (not resultthen return nil end
    local tabela={}

    while true do
        local row mysql_fetch_row(result)
        if (not rowthen break end
        table.insert(tabela,row)
    end
    mysql_free_result(result)
    return tabela
end


function getSQLLink()
    return SQL
end

Jak pr?buje si? po??czy? to mam taki b??d
[2016-09-16 18:43ERROR: [Skrypty]/ogrpg-db/s_db.lua:54dbConnect failedAccess denied for user 'root'@'193.33.177.12' (using passwordYES)

Je?eli kto? si? tu na tym zna to prosi?bym o pomoc.
Za pomoc :piwo:

Podpis



Kontakt
Discord: STOPseba#7603
STOPseba na fejsie
Messenger


Ostatnio zmieniony przez STOPseba 2016-09-16, 19:04, w całości zmieniany 2 razy  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-09-16, 20:10


eject

kurdebele






Wiek: 30
Na forum: 3659 dni
Posty: 182
Nick w MP: EjecT

Piwa: 2456

Respekt: 85,8

Ostrzeżeń: 60%
host spr?buj zamieni? na :
sql.pukawka.pl:3306


Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-09-16, 20:53


STOPseba

Emeryt na scenie MTA






Wiek: 25
Na forum: 3771 dni
Posty: 448
Nick w MP: STOPseba

Piwa: 5014

Respekt: 576,3
Respekt: 576,3

"eject" napisał/a:

host spr?buj zamieni? na :
sql.pukawka.pl:3306

Dalej nic

Podpis



Kontakt
Discord: STOPseba#7603
STOPseba na fejsie
Messenger


Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-09-16, 21:00


dudeks







Wiek: 31
Na forum: 6576 dni
Posty: 171

Piwa: 89

Respekt: 105,3
Respekt: 105,3

Czy ty serio nie widzisz, ?e skrypt pr?buje si? ??czy? jako u?ytkownik 'root' i z innym hostem ni? masz podane w configu?

Pinging sql.pukawka.pl [193.33.177.152]

Tak?e, masz ten config chyba w innym zasobie ni? odpalasz...

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-09-16, 21:03


eject

kurdebele






Wiek: 30
Na forum: 3659 dni
Posty: 182
Nick w MP: EjecT

Piwa: 2456

Respekt: 85,8

Ostrzeżeń: 60%
w hoscie daj
193.33.177.152


Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-09-16, 21:32


dudeks







Wiek: 31
Na forum: 6576 dni
Posty: 171

Piwa: 89

Respekt: 105,3
Respekt: 105,3

"eject" napisał/a:

w hoscie daj
193.33.177.152


Co mu da sama zmiana hostu, skoro skrypt i tak si? ??czy z inn? nazw? uzytkownika i pewnie z innym has?em tak?e.

Tka to jest jak pobieracie g?wnanie skrypty z internetu i nawet nie potraficie ich uruchomi?...

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-09-17, 14:02


STOPseba

Emeryt na scenie MTA






Wiek: 25
Na forum: 3771 dni
Posty: 448
Nick w MP: STOPseba

Piwa: 5014

Respekt: 576,3
Respekt: 576,3

Dzi?ki ka?demu za pomoc juz sobie porazi?em z tym problemem

Podpis



Kontakt
Discord: STOPseba#7603
STOPseba na fejsie
Messenger


Postaw piwo autorowi tego posta
 

 
Tagi: mysql
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Mysql Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku