MySQL Setup

MySQL Servers

MySQL-Server vs MariaDB

Most resources for FiveM were designed to be used with MySQL 5.7 and may hit compatibility issues when using MySQL 8, i.e.

  • More reserved keywords, like 'stored' and 'group'.
  • Longtext / JSON fields do not support default values. MariaDB is highly recommended for compatibility, and improved performance (over all versions of MySQL).

Installation

⚠️

For Development, it is okay to use XAMPP, but for Production, it is highly Recommended to install a MariaDB Server directly.

MariaDB Server

Download

Install

  • Run the installer that you downloaded and click Next.
  • Accept the License Agreement and click Next.
  • You will then be shown this window, just ignore it and press Next.
  • You will then be asked to Set a Password for the root user, this should be a strong password, as it is the main user for the database.
  • Once you have set a password, click Next.
  • It will then show you this window, it is recommended to leave it as default, but you can change it if you want.
  • Click Next and then Install and it will install.
  • Done! You now have a MariaDB Server running on your machine!

XAMPP

Download

Install

  • Run the installer that you downloaded.

Note: you may get this warning, just ignore it and click OK

  • When Asked to select components, make sure to un-select everything except for MySQL Server.
  • It will then ask for an install location, you can leave it as default, or change it to your liking.
  • It will then ask for your language preference
  • After that, click Next and it will install.
  • Once Installed, click Finish and Head to the next Step!

Start MySQL Server

It is highly recommended to run the XAMPP Control Panel as Administrator.

  • Upon Starting the XAMPP Control Panel, you should see this window.
  • Simply click Start on the MySQL Server, and it will start.
  • Done! You now have a MySQL Server running on your machine!

Optional: You can also press this button To Install it as a Service, so it will start automatically when you start your PC.