MySQL installation
We need to do some preparation before we can start using mysql with fs_freemode.
This document will guide you through these steps
1. Download mysql-async
Download mysql-async.
Install the content of this repository in the resources/mysql-async
folder.
The name of the folder matters, do not use a different name!
2. Download esplugin_mysql
- Download esplugin_mysql
- Extract the zip file and copy the files to
resources/esplugin_mysql
. - Import the SQL file that comes with esplugin_mysql in to your database with any tool you like (phpmyadmin, HeidiSQL, ..).
3. Prepare your server
You need to add your mysql user credentials into the server.cfg.
This will allow essentialmode and fs_freemode to authenticate to your mysql server.
Copy paste the example below and change it with your data.
Once you start the server, fs_freemode will automatically create the table inside your database so you don't need to import any sql file.
MySQL Connection String
Key | Description |
---|---|
server | This is the IP-address for connecting to your MySQL server |
database | This is the database that you use for essentialmode and fs_freemode |
username | This is the username that you use to authenticate to your database. |
password | This is the password that you use to authenticate to your database. |
Example
endpoint_add_tcp "0.0.0.0:30120"
endpoint_add_udp "0.0.0.0:30120"
set database_driver "mysql-async"
set mysql_connection_string "server=127.0.0.1;database=essentialmode;userid=root;password=YourPasswordHere;"
set es_enableCustomData 1
add_ace resource.essentialmode command.add_ace allow
add_ace resource.essentialmode command.add_principal allow
start mapmanager
start chat
start spawnmanager
start sessionmanager
start hardcap
start rconlog
start playernames
start mysql-async
start essentialmode
start es_admin2
start esplugin_mysql
start fs_freemode
sv_scriptHookAllowed 1
# change this
rcon_password ChangeThisPlease
sv_hostname "My New FX-Server"
# nested configs!
#exec server_internal.cfg
# loading a server icon (96x96 PNG file)
#load_server_icon myLogo.png
# disable announcing? clear out the master by uncommenting this
#sv_master1 ""
# want to only allow players authenticated with a third-party provider like Steam?
#sv_authMaxVariance 1
#sv_authMinTrust 5
# add system admins
add_ace group.admin command allow # allow all commands
add_ace group.admin command.quit deny # but don't allow quit
#add_principal identifier.steam:110000112345678 group.admin # add the admin to the group
sv_endpointprivacy true
# server slots limit (must be between 1 and 31)
sv_maxclients 30
# license key for server (https://keymaster.fivem.net)
sv_licensekey your-key-here
Updated less than a minute ago
What’s Next