🛢️MySQL Installation

Creating a local server environment on your Windows machine with XAMPP and setting up a database for FiveM involves a few steps. This guide will show you how to do it in no time!


Step 1: Update and Upgrade your linux machine

sudo update
sudo upgrade -y

This will take a little bit so give it sometime keep your SSH connection open while running this process.

Step 2: Installing mysql-server

sudo apt install mysql-server -y

Step 3: Connecting to mysql

Run the following command to get into the MySQL server in SSH

sudo mysql

Step 4: Assigning a password to the root account

Change password with the password you want the root account for this demo we used: COOLYou can generate a secure password by visiting this website CLICK ME

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'COOL';
FLUSH PRIVILEGES;
EXIT; 

Step 5: Logging back into your MySQL server after changing the password

sudo mysql -u root -p

Now enter your new password in this case it would be COOL

Step 6: Creating the FiveM database

CREATE DATABASE fivem;

Step 7: Exit

EXIT;

😊 Congratulations, you created your first database in a linux server.

Last updated