Pryaxis / TShock

☕️⚡️TShock provides Terraria servers with server-side characters, anti-cheat, and community management tools.
GNU General Public License v3.0
2.43k stars 382 forks source link

Tshock SSC with MySQL on Debian Server #2652

Open Netroshin1 opened 2 years ago

Netroshin1 commented 2 years ago

Reproduction steps (if applicable)?

I am running the following on my debian server: tshock v4.5.17.0 mono 6.8.0.105 MySQL 8.0.30

I have some issues with MySQL. Yesterday it worked without any problems, I configured the "config.json" for MySQL and created a database for terraria. Today I played from another computer on my server with the same character (SSC is on), everything works good. 10 minutes ingame and no items would drop. I could break stone but they didn't drop. So I decided to restart Terraria, the tshock-server, the whole root-server, nothing helped. Everytime no player can connect to the server and they stuck on "Server found", me neither. If I disable MySQL for the server they can connect as usual.

Netroshin1 commented 2 years ago

I solved the problem by myself. For someone with the same problem like mine, here is the solution:

  1. Create a second database with MySQL and change the "config.json" to use the new database.
  2. start the server as normal, join and register one player
  3. exit the server with your character and close the server
  4. change the "config.json" to use the old database
  5. start the server again as normal. finished.

I rly don't know how changing the database to another and back to the old one can solve this issue but it worked for me...