[Ayuda] їHay algъn error en esto? no se me conecta a la DB.
#1

Bueno, el sv no se me conecta a la base de datos.

Dejo este cуdigo por si tiene algъn error o algo.

pawn Код:
new Conecction;
public OnGameModeInit()
{
    printf("Iniciando conexiуn MySQL: (Servidor: '%s', Usuario: '%s', Clave: '%s', Base de Datos: '%s')", MySQL_Servidor, MySQL_Usuario, MySQL_Clave, MySQL_BD);
    Conecction = mysql_connect(MySQL_Servidor, MySQL_Usuario, MySQL_BD,MySQL_Clave);
    if (mysql_errno() == 0)
    {
    print("Conectado correctamente con el servidor MySQL.");
    }   else {
    print("No se ha podido conectar al servidor MySQL.");
    SendRconCommand("exit");
    }
}
Y acб dejo el server_log.

Код:
 SA-MP Dedicated Server
----------------------
v0.3z, ©2005-2014 SA-MP Team

[01:04:18] filterscripts = ""  (string)
[01:04:18] 
[01:04:18] Server Plugins
[01:04:18] --------------
[01:04:18]  Loading plugin: sscanf
[01:04:18] 

[01:04:18]  ===============================

[01:04:18]       sscanf plugin loaded.     

[01:04:18]    © 2009 Alex "******" Cole

[01:04:18]    0.3d-R2 500 Players "dnee"

[01:04:18]  ===============================

[01:04:18]   Loaded.
[01:04:18]  Loading plugin: streamer
[01:04:18]   Loaded.
[01:04:18]  Loading plugin: mysql
[01:04:18] 

  > MySQL plugin R7 successfully loaded.

[01:04:18]   Loaded.
[01:04:18]  Loaded 3 plugins.

[01:04:18] 
[01:04:18] Filterscripts
[01:04:18] ---------------
[01:04:18]   Loaded 0 filterscripts.

[01:04:18]  
[01:04:18]  ======================================= 
[01:04:18]  |                                     | 
[01:04:18]  |        YSI version 1.04.0000        | 
[01:04:18]  |        By Alex "******" Cole        | 
[01:04:18]  |                                     | 
[01:04:18]  ======================================= 
[01:04:18]  
[01:04:18] OnGameo
[01:04:18] Iniciando conexiуn MySQL: (Servidor: 'localhost', Usuario: 'root', Clave: '', Base de Datos: 'lvrp')
[01:04:19] No se ha podido conectar al servidor MySQL.
[01:04:19] Number of vehicle models: 0
[01:04:19] --- Server Shutting Down.
[01:04:19] 

[01:04:19]  ===============================

[01:04:19]      sscanf plugin unloaded.    

[01:04:19]  ===============================

[01:04:19] 

*** Streamer Plugin v2.7.3 by Incognito unloaded ***
Reply
#2

Muestra a que BD te conectas y eso
Reply
#3

Lo que puedes hacer es aсadir al printf el nъmero de error que te da mysql_errno y luego revisar la documentaciуn de MySQL.

http://dev.mysql.com/doc/refman/5.0/...-handling.html
Reply
#4

Probaste usando 127.0.0.1 en vez de localhost en tu variable MySQL_Servidor?

recuerda tambien revisar tu mysql_ log.txt
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)