Merge pull request #9152 from lrupp/patch-2

Additional GRANT options for MySQL
This commit is contained in:
Alexander Aleksandrovič Klimov 2022-01-19 10:39:16 +01:00 committed by GitHub
commit 30e1e8d3f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 3 deletions

View File

@ -711,17 +711,20 @@ Set up a MySQL database for Icinga 2:
# mysql -u root -p # mysql -u root -p
CREATE DATABASE icinga; CREATE DATABASE icinga;
GRANT SELECT, INSERT, UPDATE, DELETE, DROP, CREATE VIEW, INDEX, EXECUTE ON icinga.* TO 'icinga'@'localhost' IDENTIFIED BY 'icinga'; GRANT ALTER, CREATE, SELECT, INSERT, UPDATE, DELETE, DROP, CREATE VIEW, INDEX, EXECUTE ON icinga.* TO 'icinga'@'localhost' IDENTIFIED BY 'icinga';
quit quit
``` ```
Please note that the example above uses the very simple password 'icinga' (in `IDENTIFIED BY 'icinga'`).
Please choose a better password for your installation.
![setting up the database on CentOS 7](images/installation/mariadb-centos7.png "Setting up the database on CentOS 7") ![setting up the database on CentOS 7](images/installation/mariadb-centos7.png "Setting up the database on CentOS 7")
After creating the database you can import the Icinga 2 IDO schema using the After creating the database you can import the Icinga 2 IDO schema using the
following command. Enter the root password into the prompt when asked. following command. Enter the icinga password into the prompt when asked.
```bash ```bash
mysql -u root -p icinga < /usr/share/icinga2-ido-mysql/schema/mysql.sql mysql -u icinga -p icinga < /usr/share/icinga2-ido-mysql/schema/mysql.sql
``` ```
#### Enabling the IDO MySQL module <a id="enabling-ido-mysql"></a> #### Enabling the IDO MySQL module <a id="enabling-ido-mysql"></a>