Wysłany: 2017-02-02, 16:43
RivEk2002
Wiek: 23 Na forum: 4002 dni Posty: 193
Nick w MP: RivEk
Piwa : 9
Siem, jestem nowy w mysql i jak podlaczyc baze pod dom?wke. Mam WampSerwer pobrany itp. Tylko co w kodzie definicji mam wpisac
Podpis
Pomagam w miare moich możliwości !
Moje gg to: 53393163
Masz problem to możesz napisac !
Wysłany: 2017-02-02, 17:54
AirBum
Wiek: 28 Na forum: 5434 dni Posty: 47
Nick w MP: Brak
Piwa : 507
Odpalasz MySQL i Apache w Wampserver. Emm, mo?esz skorzysta? r?wnie? z jakiego? pluginu MYSQL z forum samp'a, lecz kompletnie mija si? to z celem dla zwyk?ego pod??czenia si? do bazy danych i lepiej jest skorzysta? z podstawowych funkcji SQL, za??czonych ju? w podstawowej paczce include.
Kod: native DB:db_open(name[]);
native db_close(DB:db);
native DBResult:db_query(DB:db, query[]);
native db_free_result(DBResult:dbresult);
native db_num_rows(DBResult:dbresult);
native db_next_row(DBResult:dbresult);
native db_num_fields(DBResult:dbresult);
native db_field_name(DBResult:dbresult, field, result[], maxlength);
native db_get_field(DBResult:dbresult, field, result[], maxlength);
native db_get_field_int(DBResult:result, field = 0);
native Float:db_get_field_float(DBResult:result, field = 0);
native db_get_field_assoc(DBResult:dbresult, const field[], result[], maxlength);
native db_get_field_assoc_int(DBResult:result, const field[]);
native Float:db_get_field_assoc_float(DBResult:result, const field[]);
native db_get_mem_handle(DB:db);
native db_get_result_mem_handle(DBResult:result);
native db_debug_openfiles();
native db_debug_openresults();
Wysłany: 2017-02-02, 18:05
RivEk2002
Wiek: 23 Na forum: 4002 dni Posty: 193
Nick w MP: RivEk
Piwa : 9
Ale chodzi mi o to ze ja nwm co wpisac w tych definicjach jakis root to uzytkownik tam bie ma hasla tylko root ale host podac trzeba to localhost i co dalej ?
[ Dodano : 2017-02-02, 18:27 ]
A to logi
Kod:
SA-MP Dedicated Server
----------------------
v0.3.7-R2, (C)2005-2015 SA-MP Team
[18:23] filterscripts = "" (string)
[18:23]
[18:23] Server Plugins
[18:23] --------------
[18:23] Loading plugin: mysql.dll
[18:23] SA:MP MySQL Plugin v2.1.1 Loaded.
[18:23] Loaded.
[18:23] Loading plugin: sscanf.dll
[18:23]
[18:23] [MySQL] Thread running. Threadsafe: Yes.
[18:23] ===============================
[18:23] sscanf plugin loaded.
[18:23] (c) 2009 Alex "Y_Less" Cole
[18:23] 0.3d-R2 500 Players "dnee"
[18:23] ===============================
[18:23] Loaded.
[18:23] Loaded 2 plugins.
[18:23]
[18:23] Filterscripts
[18:23] ---------------
[18:23] Loaded 0 filterscripts.
[18:23] ----- GameMode prTRUCK Alpha > 0.0.1 Alpha ---------
[18:23] Officialny autor calego skryptu: >> Kacper Zakrzewski <<
[18:23] [gamemode] Rozpoczynam ladowac elementy gry!
[18:23] [MySQL] Error (0): Failed to connect. Access denied for user 'root'@'localhost' (using password: YES).
[18:23] [gamemode] Nie poloczono z baza danych MySQL! Zamykanie servera...
[18:23] [gamemode] Stabilizacja polaczenia z > localhost | USER: root
[18:23] [MySQL] Error (0): Function: mysql_query called when not connected to any database. Access denied for user 'root'@'localhost' (using password: YES).
[18:23] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database. Access denied for user 'root'@'localhost' (using password: YES).
[18:23] [MySQL] Error (0): Function: mysql_fetch_row called when not connected to any database. Access denied for user 'root'@'localhost' (using password: YES).
[18:23] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database. Access denied for user 'root'@'localhost' (using password: YES).
[18:23] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database. Access denied for user 'root'@'localhost' (using password: YES).
[18:23] [gamemode] Wczytano ustawienie z localhost > cfgMaxFuel 0
[18:23] [MySQL] Error (0): Function: mysql_query called when not connected to any database. Access denied for user 'root'@'localhost' (using password: YES).
[18:23] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database. Access denied for user 'root'@'localhost' (using password: YES).
[18:23] [MySQL] Error (0): Function: mysql_fetch_row called when not connected to any database. Access denied for user 'root'@'localhost' (using password: YES).
[18:23] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database. Access denied for user 'root'@'localhost' (using password: YES).
[18:23] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database. Access denied for user 'root'@'localhost' (using password: YES).
[18:23] [gamemode] Wczytano ustawienie z localhost > cfgLevelUp 0
[18:23] [MySQL] Error (0): Function: mysql_query called when not connected to any database. Access denied for user 'root'@'localhost' (using password: YES).
[18:23] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database. Access denied for user 'root'@'localhost' (using password: YES).
[18:23] [MySQL] Error (0): Function: mysql_fetch_row called when not connected to any database. Access denied for user 'root'@'localhost' (using password: YES).
[18:23] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database. Access denied for user 'root'@'localhost' (using password: YES).
[18:23] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database. Access denied for user 'root'@'localhost' (using password: YES).
[18:23] [gamemode] Wczytano ustawienie z localhost > cfgUnemployedColor Nie Znaleziono!
[18:23] [MySQL] Error (0): Function: mysql_query called when not connected to any database. Access denied for user 'root'@'localhost' (using password: YES).
[18:23] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database. Access denied for user 'root'@'localhost' (using password: YES).
[18:23] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database. Access denied for user 'root'@'localhost' (using password: YES).
[18:23] [MySQL] Error (0): Function: mysql_fetch_row called when not connected to any database. Access denied for user 'root'@'localhost' (using password: YES).
[18:23] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database. Access denied for user 'root'@'localhost' (using password: YES).
[18:23] [gamemode] Zaladowano pomyslnie 0 pojazdow!
[18:23] [MySQL] Error (0): Function: mysql_query called when not connected to any database. Access denied for user 'root'@'localhost' (using password: YES).
[18:23] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database. Access denied for user 'root'@'localhost' (using password: YES).
[18:23] [MySQL] Error (0): Function: mysql_fetch_row called when not connected to any database. Access denied for user 'root'@'localhost' (using password: YES).
[18:23] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database. Access denied for user 'root'@'localhost' (using password: YES).
[18:23] [gamemode] Zaladowano pomyslnie 0 zaladunkow!
[18:23] [MySQL] Error (0): Function: mysql_query called when not connected to any database. Access denied for user 'root'@'localhost' (using password: YES).
[18:23] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database. Access denied for user 'root'@'localhost' (using password: YES).
[18:23] [MySQL] Error (0): Function: mysql_fetch_row called when not connected to any database. Access denied for user 'root'@'localhost' (using password: YES).
[18:23] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database. Access denied for user 'root'@'localhost' (using password: YES).
[18:23] [gamemode] Zaladowano pomyslnie 0 znakow drogowych! || Oraz Obiekty!
[18:23] [MySQL] Error (0): Function: mysql_query called when not connected to any database. Access denied for user 'root'@'localhost' (using password: YES).
[18:23] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database. Access denied for user 'root'@'localhost' (using password: YES).
[18:23] [MySQL] Error (0): Function: mysql_fetch_row called when not connected to any database. Access denied for user 'root'@'localhost' (using password: YES).
[18:23] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database. Access denied for user 'root'@'localhost' (using password: YES).
[18:23] [gamemode] Zaladowano pomyslnie 0 stacji benzynowych!
[18:23] [gamemode] Licencja pRT41201480122[ERROR 401]
[18:23] [gamemode] Wystapil ERROR 401, zamykanie servera!
[18:23] [OMGGG]pRT44180351235235123351235235123525235125123522252522222233521222235222017555333521235252352235123
[18:23] [autor] Autor KapiziaK 2015 airserwer24.pl
[18:23] Number of vehicle models: 0
[18:23] --- Server Shutting Down.
[18:23] [MySQL] Error (0): Function: mysql_query called when not connected to any database. Access denied for user 'root'@'localhost' (using password: YES).
[18:23] [MySQL] Error (0): Function: mysql_close called when not connected to any database. Access denied for user 'root'@'localhost' (using password: YES).
[18:23] >>>> GAMEMODE EXIT > Procedura wylaczania servera <<<<<<<<<
[18:23] SA:MP MySQL Plugin v2.1.1 Unloaded.
[18:23]
[18:23] ===============================
[18:23] sscanf plugin unloaded.
[18:23] ===============================
TU ZATO DEFINE
#define HOST " "
#define USER " "
#define PASS " "
#define DATA " "
TU JEST FUNKCJA
Pawn new polacz = mysql_connect ( HOST , USER , PASS , DATA , SQL , . auto_reconnect = 1 );
Podpis
Pomagam w miare moich możliwości !
Moje gg to: 53393163
Masz problem to możesz napisac !
Wysłany: 2017-02-02, 18:37
AirBum
Wiek: 28 Na forum: 5434 dni Posty: 47
Nick w MP: Brak
Piwa : 507
#define HOST "localhost"
#define USER "root"
#define PASS " "
#define DATA "JakSamaNazwaWskazuje"
Wysłany: 2017-02-02, 18:43
RivEk2002
Wiek: 23 Na forum: 4002 dni Posty: 193
Nick w MP: RivEk
Piwa : 9
Napiszesz o tej data ? Nigdy nie robilem w mysql
Podpis
Pomagam w miare moich możliwości !
Moje gg to: 53393163
Masz problem to możesz napisac !
Wysłany: 2017-02-02, 19:03
Wafelowski
Wiek: 29 Na forum: 5347 dni Posty: 428
Piwa : 100
Wysłany: 2017-02-02, 20:33
RivEk2002
Wiek: 23 Na forum: 4002 dni Posty: 193
Nick w MP: RivEk
Piwa : 9
No to nazwa bazy ta ? Czyli jak bo tam w pjpmyadmin nie mam nic. Mam plik.db i w scriptfiles dalem. Dobrze ?
Podpis
Pomagam w miare moich możliwości !
Moje gg to: 53393163
Masz problem to możesz napisac !
Wysłany: 2017-02-03, 13:18
Virex_PL
Głos rozsądku
Wiek: 26 Na forum: 4187 dni Posty: 170
Nick w MP: Virex_PL
Piwa : 31
To jest nazwa bazy czesto ma taka sama nawe jak login. Jak nie masz tej bazy to ja utw?rz.
Wysłany: 2017-02-04, 08:35
RivEk2002
Wiek: 23 Na forum: 4002 dni Posty: 193
Nick w MP: RivEk
Piwa : 9
Utworzy?em i nadal nic. Wpisa?em te?
Podpis
Pomagam w miare moich możliwości !
Moje gg to: 53393163
Masz problem to możesz napisac !
Wysłany: 2017-02-04, 12:12
MG303
Wiek: 30 Na forum: 6418 dni Posty: 654
Piwa : 2990
Najlepiej kupi? sobie tak? baz? danych np na serverproject. Ile mo?e kosztowa?, z 4z??
Wysłany: 2017-02-04, 13:38
ToxiC.
Wiek: 28 Na forum: 5246 dni Posty: 3792
Piwa : 8590
"MG303" napisał/a :Najlepiej kupi? sobie tak? baz? danych np na serverproject. Ile mo?e kosztowa?, z 4z??
2 z? na miesi?c.
Wysłany: 2017-02-04, 16:32
RivEk2002
Wiek: 23 Na forum: 4002 dni Posty: 193
Nick w MP: RivEk
Piwa : 9
Plus koszta hosta. I tera xamp pobralem bo wampserwer sie zepsol i nie dziala to i to
Podpis
Pomagam w miare moich możliwości !
Moje gg to: 53393163
Masz problem to możesz napisac !
Wysłany: 2017-02-04, 17:04
Virex_PL
Głos rozsądku
Wiek: 26 Na forum: 4187 dni Posty: 170
Nick w MP: Virex_PL
Piwa : 31
WebServ jest dobry sam go uzywam, bo z xamp mialem problemy.
W webserv zrob tak
#define HOST "localhost"
#define USER "root"
#define PASS " "
#define DATA "webserv" //taka jest standardowa baza
Nazwy baz sa wyswietlone jesli zalogujesz sie do phpmyadmin po lewej stronie...
Wysłany: 2017-02-04, 18:07
ToxiC.
Wiek: 28 Na forum: 5246 dni Posty: 3792
Piwa : 8590
RivEk2002 , na serverproject mo?esz kupi? sam? baz? danych bez serwera, je?li o to Ci chodzi?o.
Tagi: mysql
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: