[Off] Novato em MySQL
#1

Tenho dъvidas referentes ao uso correto da MySQL...

Code:
#define SQL_HOST "Your DB Host"
#define SQL_USER "DB Username"
#define SQL_PASS "DB Pass"
#define SQL_DB "DB Name"//
*O que devo colocar em cada uma dessas defines?
*Como abro o arquivo .sql e qual o programa (database)?


@EDIT

Log:
Quote:

----------
Loaded log file: "server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3.7-R2, ©2005-2015 SA-MP Team

[12:33:54]
[12:33:54] Server Plugins
[12:33:54] --------------
[12:33:54] Loading plugin: mysql.dll
[12:33:54]

> MySQL plugin R5 successfully loaded.

[12:33:54] Loaded.
[12:33:54] Loaded 1 plugins.

[12:33:54]
[12:33:54] Filterscripts
[12:33:54] ---------------
[12:33:54] Loading filterscript 'npcs.amx'...
[12:33:55] [connection] 127.0.0.1:64976 requests connection cookie.
[12:33:55] [connection] 127.0.0.1:64975 requests connection cookie.
[12:33:55] [connection] 127.0.0.1:64978 requests connection cookie.
[12:33:55] [connection] 127.0.0.1:64977 requests connection cookie.
[12:33:55] [connection] 127.0.0.1:64980 requests connection cookie.
[12:33:55] [connection] 127.0.0.1:64979 requests connection cookie.
[12:33:55] [connection] 127.0.0.1:64981 requests connection cookie.
[12:33:55] [connection] 127.0.0.1:64982 requests connection cookie.
[12:33:55] Loaded 1 filterscripts.

[12:33:55] [connection] 127.0.0.1:64983 requests connection cookie.
[12:33:55] [connection] 127.0.0.1:64984 requests connection cookie.
[12:33:55] [connection] 127.0.0.1:64985 requests connection cookie.
[12:33:55] [connection] 127.0.0.1:64986 requests connection cookie.
[12:33:55] [connection] 127.0.0.1:64987 requests connection cookie.
[12:33:55] [connection] 127.0.0.1:64988 requests connection cookie.
[12:33:55] [connection] 127.0.0.1:64990 requests connection cookie.
[12:33:55] [connection] 127.0.0.1:64989 requests connection cookie.
[12:33:56] [MYSQL]: [ERROR]: Connection To `testee` Failed!
[12:33:56] [MYSQL]: Could Not Retrieve Field - Shutting Down Server.
[12:33:58]
[12:33:58] Number of vehicle models: 125
[12:33:58] --- Server Shutting Down.

@RESOLVIDO =)
------------------------------------------------------------------------------
@EDIT2

Gostaria de saber tambйm se tem como Vincular GM + FS Registro:
Ex:
FS REGISTRO: LoginPlayer (conta quantas vezes o player logou e seta na database .sql)
GM: /setscore (seta e guarda o score do player no mesmo arquivo database .sql em uma outra coluna)

Й possнvel?
Reply
#2

https://www.youtube.com/watch?v=zLXlFzteap8
Reply
#3

Saudaзхes !


O prуprio nome dos macros jб diz o significado !

PHP Code:
#define SQL_HOST "Your DB Host" // o local da sua data base, se for localhost pode deixar localhost ou o endereзo da database
#define SQL_USER "DB Username" //usuario da database
#define SQL_PASS "DB Pass" // senha da database
#define SQL_DB "DB Name"//nome da database 
simples nгo й ? agora o servidor estб desligando pelo motivo de nгo conseguir estabelecer conexгo com a sua database
Reply
#4

https://sampforum.blast.hk/showthread.php?tid=428964
Reply
#5

Obrigado a todos!
Reply
#6

Quote:
Originally Posted by Sky™
View Post
Saudaзхes !


O prуprio nome dos macros jб diz o significado !

PHP Code:
#define SQL_HOST "Your DB Host" // o local da sua data base, se for localhost pode deixar localhost ou o endereзo da database
#define SQL_USER "DB Username" //usuario da database
#define SQL_PASS "DB Pass" // senha da database
#define SQL_DB "DB Name"//nome da database 
simples nгo й ? agora o servidor estб desligando pelo motivo de nгo conseguir estabelecer conexгo com a sua database
Na verdade nгo sгo macros, sгo apenas definiзхes mesmo sky :P
Reply
#7

Quote:
Originally Posted by s0nny
View Post
Na verdade nгo sгo macros, sгo apenas definiзхes mesmo sky :P
Definiзхes sгo macros.

Na verdade nгo sгo callbacks, sгo apenas public mesmo :P
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)