Duplicate connection detected [MYSQL WARNING] - 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: Duplicate connection detected [MYSQL WARNING] (
/showthread.php?tid=639089)
Duplicate connection detected [MYSQL WARNING] -
DuyDang2412 - 11.08.2017
Hello guys, I don't know anything about this warning, please tell me a way to fix this issue. This always happens when I run 'gmx' command in server console and I didn't log out of the server, it just re-connects and then, it shows this warning.
Quote:
[WARNING] duplicate connection detected: handle id 1 already exists with host = 'localhost', username = 'root' and database = 'bare'
|
Re: Duplicate connection detected [MYSQL WARNING] -
DuyDang2412 - 11.08.2017
Sorry for posting this without any effort to find out a solution, but now I found!
You just need to put 'mysql_close(MYSQL_HANDLE)' in 'public OnGamemodeExit()'
Re: Duplicate connection detected [MYSQL WARNING] -
Dayrion - 11.08.2017
If you have a filterscript which require to connect to your database, you will get the same warning.
You can use this in your OnGamemodeInit()
PHP код:
mysql_global_options(DUPLICATE_CONNECTIONS, true);
Re: Duplicate connection detected [MYSQL WARNING] -
DuyDang2412 - 11.08.2017
Quote:
Originally Posted by Dayrion
If you have a filterscript which require to connect to your database, you will get the same warning.
You can use this in your OnGamemodeInit()
PHP код:
mysql_global_options(DUPLICATE_CONNECTIONS, true);
|
I got it, thank you.