# 🛢️MySQL Installation

***

#### Step 1: Update and Upgrade your linux machine

```bash
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

```bash
sudo apt install mysql-server -y
```

#### Step 3: Connecting to mysql

Run the following command to get into the MySQL server in SSH&#x20;

```bash
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: `COOL`You can generate a secure password by visiting this website [CLICK ME](https://www.lastpass.com/features/password-generator#generatorTool)

```sql
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'COOL';
```

```sql
FLUSH PRIVILEGES;
```

```bash
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

```sql
CREATE DATABASE fivem;
```

#### Step 7: Exit

```sql
EXIT;
```

😊 Congratulations, you created your first database in a linux server.&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.nat2k15.xyz/paid-scripts/fivem-framework/choose-your-hosting/linux-hosting/mysql-installation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
