AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Module Coding (https://forums.alliedmods.net/forumdisplay.php?f=9)
-   -   [SQL] MySQL Connector :: Remote Database (+Natives) (https://forums.alliedmods.net/showthread.php?t=227170)

joropito 10-05-2013 10:36

Re: [SQL] MySQL Connector :: Remote Database (+Natives)
 
Quote:

Originally Posted by K.K.Lv (Post 2045064)
another problem , I think you have to consider the handler of the connection, I think most of coders knowing the error code of MySql, like "CR_SERVER_GONE_ERROR(error No. is 2006)" and the "CR_SERVER_LOST(error No. is 2013)", so I suggest you that check whether the handler of the connection is valid or not before you execute the query

Best way is using mysql_pconnect().

I like how oracle drivers works with tns names.
You have a connection pool for a unique name (can have more than 1 different pool). Then you can tell your app to use that pool for each operation. The drivers itself handle reconnection (can be achieved with mysql_pconnect).

claudiuhks 10-06-2013 05:40

Re: [SQL] MySQL Connector :: Remote Database (+Natives)
 
Quote:

Originally Posted by K.K.Lv (Post 2045064)
another problem , I think you have to consider the handler of the connection, I think most of coders knowing the error code of MySql, like "CR_SERVER_GONE_ERROR(error No. is 2006)" and the "CR_SERVER_LOST(error No. is 2013)", so I suggest you that check whether the handler of the connection is valid or not before you execute the query

Thank you. I will remember that and I will do some tests soon.
But for now, if the MySQL remote server is nice enough, the MySQL options function with the reconnecting feature enabled should be enough.

K.K.Lv 10-06-2013 21:59

Re: [SQL] MySQL Connector :: Remote Database (+Natives)
 
@joropito
you are right, a connection pool will be nice
:up:

bcKq 11-07-2013 13:21

Re: [SQL] MySQL Connector :: Remote Database (+Natives)
 
PHP Code:

failed to loadModule/Library "remote_database" required for plugin.  Check modules.ini

Modules.ini
PHP Code:

mysql
;sqlite
fun
engine
fakemeta
;geoip
;sockets
;regex
nvault
cstrike
csx
hamsandwich
remote_database 

It's uploaded into amxmodx/modules folder. I don't know why it doesn't want to load.
AMXX 1.8.2
Linux
Newest SteamCMD version
Metamod v1.21p37 2013/05/30 (5:13)

Also it says in amx_modules:
PHP Code:

unknown                 unknown     unknown              bad load 

EDIT:

Your module SQL Lite connector loads normally. It's only this module.

claudiuhks 11-10-2013 10:28

Re: [SQL] MySQL Connector :: Remote Database (+Natives)
 
It should be running, but I think the version of MySQL is too recent for old operating systems.
I will attach to this message tonight another versions that should be working with any old OS.

bcKq 11-10-2013 11:35

Re: [SQL] MySQL Connector :: Remote Database (+Natives)
 
I think that my MySQL version is 5.1.39. Unfortunately, I can't change that because I only rent this server.

claudiuhks 03-08-2014 20:11

Re: [SQL] MySQL Connector :: Remote Database (+Natives)
 
Pushed a build.

metal_upa 01-26-2018 13:32

Re: [SQL] MySQL Connector :: Remote Database (+Natives)
 
Did anyone still has this module? it seems download link is not available.


All times are GMT -4. The time now is 01:25.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.