Share MySQL database among multiple servers?

So I have a single mysql server that I want to use to share / sync bans across multiple servers. Though I am having an issue where different game servers have different incremental BAN_IDs:
~/serverfiles/oxide/data/EnhancedBanSystem_ID.json

Sharing the bans is not a problem (all servers can connect to the mysql database and run querries when players connect with no issue and will prevent players from joining if on the ban list). The problem is I cant have mutliple servers ADD bans to the mysql database as the banning "id" between game servers are not shared between the plugin.
I have tried manually editing in linux and reloading the plugin with no sucess (keeps reverting back):
~/serverfiles/oxide/data/EnhancedBanSystem_ID.json

If a 2ndary server tries to add a ban using an exsisting id game console it will say MySQL: Successfully added...... etc, but running a mysql query to veryify shows its not added.

It has been brought to my attention that my question may be confusing. The question I need answered is how does one adjust the "EnhancedBanSystem_ID.json"? (manually changing this and reloading the plugin does not help as it just reverts back to the old ID).

This would allow other servers sharing the same database not insert conflicting records in the databases when a ban is being added on a shared database. The same can likely be true for any shared database (ie nfs mount of files, sqlite, etc)

Have you tried manually changing the ID in the plugin for each server?
yes, it doesnt take, and reloading the plugin just reverts back to the new id it was prior to me changing it.

I spent alot of time working on a sollution, but ended up giving up due to the fact the ID bug / not understanding it. Here is the code I came up with for anyone else looking to convert their EnhancedBanSystem "FILE" ---> mysql  (bash in linux):

cat ~/serverfiles/oxide/data/EnhancedBanSystem.json |grep 'expire\\\":0.0' | awk 'BEGIN {FS=",";OFS=","} {print "INSERT IGNORE INTO rustbans_gsm1.enhancedbansystem (steamid, name, ip, reason, source, game, platform, server, expire) VALUES (\x27"$2"\x27, \x27\x27, \x27"$3"\x27, " "\x27"$10"\x27, \x27Server Console\x27, \x27Rust\x27, \x27Steam\x27, \x27""*.*.*.*:28015\x27, \x27""0\x27);"}' | sed 's/\\\"steamid\\\":\\\"//g' |sed 's/\\\"//g' |sed 's/ip://g' |sed 's/name://g' |sed 's/reason://g' > bans.sql

then just import it into mysql with something similar to this (assumes client my.cnf is configured with login creds):
mysql < bans.sql



Merged post

To sum up, I was able to get multiple servers in a cluster all sharing the same mysql database working as far as blocking bans already in the databases, but only 1 "primary" server (older server higher ID number in EnhancedBanSystem_ID.json) could add bans correctly to the databases, the other servers would have ID's mis matching and thus conflicting records when attempting to add new bans to the database.

conflicting records are decided by the DATABASE & colum config, NOT the SQL using the database.

say for example you have a database, that uses the steam ID as a primary key..., then no amount of SQL (other than making it not a primary key)
will fix it..   Databases enforce data requirments on the data stored inside NOT the sql you access the database with..

What you might be able to do is build a "view" to use in the sql, then in the database make the view a combination of distinct values, say "server" + steam ID.
I have use this method to wrap 'poor' Schema design in the past....