I’m having trouble with my ZrdRoyale setup. I’ve created the MySQL database and set up the config.json file but I’m still getting a connection error. Here’s what my config file looks like:
{
"db_key": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
"db_nonce": "random_string",
"game_port": 8765,
"secret_key": "q1w2e3r4t5y6u7i8o9p0a1s2d3f4g5h6",
"db_name": "game_data",
"db_pass": "secure_password123",
"db_host": "mysql.example.com",
"db_user": "game_user",
"patch_source": "",
"error_tracking": "",
"db_port": 3306,
"repo_url": "https://example.com/game/repo",
"use_patch": false,
"min_score": 0,
"max_score": 3000,
"start_gold": 1000,
"start_gems": 50,
"start_level": 1,
"use_udp": true,
"battle_log": null,
"player_log": null,
"server_log": null,
"admin1": 0,
"admin2": 0,
"admin3": 0,
"match_gems": 0,
"match_gold": 0,
"error_log": null
}
I’ve double-checked all the settings but still can’t figure out what’s wrong. Any ideas on how to fix this connection issue?
Have you confirmed that the MySQL server is actually running on the specified host and port? Sometimes the issue isn’t with ZrdRoyale itself, but with the database connection. Try connecting to your MySQL server using a command-line tool or GUI client with the same credentials to rule out any network or authentication problems.
Also, check your firewall settings. If you’re running the game and database on different machines, ensure that the necessary ports are open. MySQL typically uses port 3306, but some setups might use a different one.
Another thing to consider is the ‘db_key’ and ‘db_nonce’ fields. These are used for encryption, so make sure they’re correctly set and match what your database expects. Incorrect values here can cause connection failures that might look like general MySQL errors.
If none of these solve the problem, you might want to enable more verbose logging in ZrdRoyale to get more detailed error messages. This can often point you directly to the source of the connection issue.
I’ve run into similar MySQL connection issues with ZrdRoyale before. One thing that stands out in your config is the ‘db_host’ value. Make sure ‘mysql.example.com’ is actually your MySQL server’s address. If you’re running it locally, try changing it to ‘localhost’ or ‘127.0.0.1’.
Also, double-check that your MySQL server is actually running and accessible on the specified port (3306). Sometimes firewalls or security settings can block connections.
Another potential issue could be with the ‘db_user’ and ‘db_pass’. Ensure that ‘game_user’ has the necessary permissions to access the ‘game_data’ database. You might want to try connecting to MySQL manually using these credentials to verify they work.
Lastly, check your ZrdRoyale logs for more detailed error messages. They often provide specific information about what’s causing the connection failure, which can be crucial for troubleshooting.