> For the complete documentation index, see [llms.txt](https://enterprise.hideez.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://enterprise.hideez.com/hideez-enterprise-server/deployment/database-installation/mysql-on-linux.md).

# MySQL on Linux

### 1. Install

### CentOS Stream *9:*

```
sudo dnf install mysql-server -y
```

Enable and start MySQL service:

```
sudo systemctl restart mysqld.service
sudo systemctl enable mysqld.service
```

### *Ubuntu*&#x20;

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

### 2.   Change the authentication parameters:

```
sudo mysql 
```

run command in mysql console:

```

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password by '<mysql_root_password>';
```

Сhange `<mysql_root_password>` to a strong password,

To exit from the MySQL console, press Ctrl+D.

* run `mysql_secure_installation`, to complete the installation:

```
$ sudo mysql_secure_installation
```

### 3. Creating MySQL User and Database

3.1. Run MySQL client and enter your MySQL root password

<pre><code><strong>sudo mysql -h localhost -u root -p
</strong></code></pre>

3.2. The following lines create a database `hesdb`, the user with name `hesuser` and password `<user_password>`. Сhange `<user_password>` to a strong password, otherwise you may get a password validator error.

```
CREATE DATABASE hesdb;
CREATE USER 'hesuser'@'%' IDENTIFIED BY '<user_password>';
GRANT ALL ON hesdb.* TO 'hesuser'@'%';
FLUSH PRIVILEGES;
```

To exit from the MySQL console, press Ctrl+D.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://enterprise.hideez.com/hideez-enterprise-server/deployment/database-installation/mysql-on-linux.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
