SA-MP Forums Archive
[Help] LARP MySQL Error - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [Help] LARP MySQL Error (/showthread.php?tid=331865)



[Help] LARP MySQL Error - minde8566 - 06.04.2012

Hello, every time i connect to server it restarts and logs are:
Код:
[00:48:18] MYSQL: MySQL Player Accounts v0.1 by Luk0r
[00:48:18] MYSQL: Adaptado y actualizado por bruunosoniico
[00:48:18] MYSQL: Attempting to connect to server...
[00:48:18] MYSQL: Database connection established.
[00:48:18] Number of vehicle models: 86
[00:48:42] Incoming connection: 127.0.0.1:56807
[00:48:42] [join] Stan_Minton has joined the server (0:127.0.0.1)
[00:48:42] MYSQL: Connection seems dead, retrying...
[00:48:42] MYSQL: Could not reconnect to server, terminating server...
[00:48:42] --- Server Shutting Down.
[00:48:42] [part] Stan_Minton has left the server (0:0)



Re: [Help] LARP MySQL Error - blank. - 06.04.2012

The details you used on mysql_connect are most likely incorrect, verify them.
Either that or the MySQL server isn't on.


Re: [Help] LARP MySQL Error - minde8566 - 06.04.2012

I'm not so dumb, the details are correct, I checked it like hundred times... And MySQL server is definately on, because I talked all day to my server host provider.


Re: [Help] LARP MySQL Error - Rob_Maate - 06.04.2012

Have you granted your server's IP access to the database?

GRANT ALL ON 'user'@'host' TO 'db' IDENTIFIED BY 'pass'


Re: [Help] LARP MySQL Error - minde8566 - 06.04.2012

YES.


Re: [Help] LARP MySQL Error - Rob_Maate - 06.04.2012

So obviously your firewall is blocking the connection.

That's the only possible explanation short of a corrupt installation


Re: [Help] LARP MySQL Error - minde8566 - 06.04.2012

How is it possible for firewall to block in Virtual Private Server?


Re: [Help] LARP MySQL Error - Rob_Maate - 06.04.2012

Post your MySQL configuration (omit usernames/passwords obviously)


Re: [Help] LARP MySQL Error - minde8566 - 06.04.2012

Код:
#define MYSQL_HOST "82.135.154.4"
#define MYSQL_USER "usr125"
#define MYSQL_PASS "87622"
#define MYSQL_DB   "usr125_db"



Re: [Help] LARP MySQL Error - Rob_Maate - 06.04.2012

...remove your username and password!? Do you want someone to hack your shit?

Change MYSQL_HOST to "localhost" or "127.0.0.1" if you are hosting the MySQL server on your VPS (I assumed from your description that you have set it up this way)