XPerience offers the ability to save player data to a local or remote SQL Database. This requires at least some knowledge of how to use MySQL and the ability to retrieve this data in whatever ways you need. This is primarily for displaying player data on a remote website for people to visit and see. An example of this feature can be seen on our primary RustLevels website where we display server and player data for servers that use our XPerience Addon mod.

  • Requirements:
    • Access to a MySQL Database
    • Knowledge on how to create a database
    • Knowledge on how to retrieve data from the database

 

  • SQL Setup:
    1. Create a database
    2. Create a database user and password with full access that can read and write to the database
    3. Edit the XPerience.json config file and add the database connection info to the SQL Info section
    4. Save the config file and reload the XPerience mod.

Once you have a database and user created you can enter the host information in the XPerience.json config file. Open the XPerience.json config file located in the oxide/config folder and look for the following section:

"SQL Info": {
    "enablesql": false,
    "SQLhost": "localhost",
    "SQLport": 3306,
    "SQLdatabase": "databasename",
    "SQLusername": "username",
    "SQLpassword": "password"
  },
  • SQLhost: If the SQL Database is on the same server as your Rust server then is option should be "localhost", otherwise this needs to be the IP address of the remote host that has the SQL database.
  • SQLport: The most commonly used port for SQL is 3306 unless otherwise specified by your host.
  • SQLdatabase: This is the name of the database you created.
  • SQLusername: This is the username of the user you created to have access to the database.
  • SQLpassword: This is the password of the user your created to have access to the database.
  • NOTES: 
    • It is recommended that you do NOT use your main account information for the username and password. If possible you should create a user and password specifically for this feature. 
    • You do NOT need to create any tables in the database, XPerience will create all the tables needed if the SQL data for connection is entered in the config file correctly.
    • You can enable and disable SQL saving from the in game admin panel however, you have to add the information to connect manually in the config.