Raised This Month: $32 Target: $400
 8% 

About MySQL and Sqlite


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
wilian159
Member
Join Date: Dec 2013
Old 12-24-2021 , 00:32   About MySQL and Sqlite
Reply With Quote #1

I have a 'bank' that saves in MYSQL, but sometimes MYSQL is off, would I be able to use SQLITE and MYSQL together?

If by chance MYSQL does not respond, save in SQLITE, and every X seconds send the SQLITE data to the MySQL server


Or is it not possible to connect 2 banks at the same time? or if you have another solution.
__________________
wilian159 is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 12-24-2021 , 04:06   Re: About MySQL and Sqlite
Reply With Quote #2

https://forums.alliedmods.net/showpo...5&postcount=10
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
CryWolf
Veteran Member
Join Date: Jul 2008
Location: Romania
Old 12-24-2021 , 04:55   Re: About MySQL and Sqlite
Reply With Quote #3

Don't bother, because if MySQL server is not on the same machine with Game Server you will always have problems with querry, i use a lot of MySQL but only on the same hawk as the Game Server, otherwise it doesn't respond verry well.
Just sain
__________________
I dont walk trough this world with fear in my heart.
www.dark-arena.com L4D, CS1.6, CZ Servers
CryWolf is offline
Send a message via MSN to CryWolf Send a message via Yahoo to CryWolf
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 12-24-2021 , 07:19   Re: About MySQL and Sqlite
Reply With Quote #4

Quote:
Originally Posted by CryWolf View Post
Don't bother, because if MySQL server is not on the same machine with Game Server you will always have problems with querry, i use a lot of MySQL but only on the same hawk as the Game Server, otherwise it doesn't respond verry well.
Just sain
You could just use threaded queries to avoid freezing the main game thread.
__________________
HamletEagle is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 12-24-2021 , 07:38   Re: About MySQL and Sqlite
Reply With Quote #5

Save to a vault file. I don't see why you would need a MySQL database for that if you are using it only in the game server itself. You're just adding an extra overhead that is not needed at all.
__________________









Last edited by CrazY.; 12-24-2021 at 07:39.
CrazY. is offline
wilian159
Member
Join Date: Dec 2013
Old 12-25-2021 , 00:05   Re: About MySQL and Sqlite
Reply With Quote #6

Quote:
Originally Posted by CryWolf View Post
Don't bother, because if MySQL server is not on the same machine with Game Server you will always have problems with querry, i use a lot of MySQL but only on the same hawk as the Game Server, otherwise it doesn't respond verry well.
Just sain
Exactly, that's the problem, I use a database outside the cs server, and sometimes it doesn't connect, I was thinking of using 'grip', but the grip has a buffer limit, they say there is no limit, I wanted to know more about.


Quote:
Originally Posted by CrazY. View Post
Save to a vault file. I don't see why you would need a MySQL database for that if you are using it only in the game server itself. You're just adding an extra overhead that is not needed at all.
the bank was an example. I'm doing something much bigger like managing admins etc.
__________________

Last edited by wilian159; 12-25-2021 at 00:08.
wilian159 is offline
Shadows Adi
AlliedModders Donor
Join Date: Aug 2019
Location: Romania
Old 12-25-2021 , 03:47   Re: About MySQL and Sqlite
Reply With Quote #7

Quote:
Originally Posted by wilian159 View Post
Exactly, that's the problem, I use a database outside the cs server, and sometimes it doesn't connect, I was thinking of using 'grip', but the grip has a buffer limit, they say there is no limit, I wanted to know more about.
For switching from MySQL to SQLite, you can take a look here:
https://github.com/ShadowsAdi/MostVa...ble_player.sma

And I use curl instead of grip for some projects and it works well, except for some incorrect buffers which seems to be intended ( https://github.com/Polarhigh/AmxxCurl/issues/11):
https://github.com/Polarhigh/AmxxCurl
__________________


Accepting Paid Requests, contact PM.

MVP Of The Round View project on GITHUB / AlliedModders
CSGO REMAKE ~ CSGO MOD [STABLE + SOURCE CODE]
Shadows Adi is offline
bigdaddy424
Senior Member
Join Date: Oct 2021
Location: Jupiter
Old 12-25-2021 , 16:24   Re: About MySQL and Sqlite
Reply With Quote #8

In order to keep both databases with fresh stats you must connect to both sources and refresh their data so whenever one fails, the other one can get you the answer to your query. I'd suggest a table on both databases that saves the integer of current systime so you know which one was updated recently in order to get what you need from that db and not the old one.
bigdaddy424 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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