P粉4360523642023-08-30 13:58:42
This page in the documentation (https://www.gamevanillawiki.com/dedicated-server-kit/demo-setup/) shows the config.json
you should edit Example.
One of the lines in the configuration file is as follows:
"db_connection_string": "root:@tcp(127.0.0.1:3306)/dsk",
Go typically uses a database connection string format that follows this format (reference: https://github.com/go-sql-driver/mysql#dsn-data-source-name):
<username>:<password>@<protocol>(<address>:<port>)/<schemaname>
The example shown in the documentation page only shows root:
for the username and password. So their sample database connection string doesn't have a password.
You need to edit this config.json
file, specify your MySQL user and add that user's password between :
and @
. < /p>
The protocol, address and port are probably correct. If you are running the database on a different server than the one running your Go application, change the IP address.