I'm following some tutorial to install Zabbix on my CentOS 7.2Here's the command line used to create zabbix database and give privilegesType 'help;' or '\h' for help. Type '\c' to clear the current input statement.MariaDB [(none)]> create database zabbix; Query OK, 1 row affected (0.00 sec)MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@'localhost' identified by 'password'; Query OK, 0 rows affected (0.00 sec)MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@'%' identified by 'password'; Query OK, 0 rows affected (0.00 sec)MariaDB [(none)]> flush privileges; Query OK, 0 rows affected (0.00 sec)MariaDB [(none)]> exit ByeI don't understand the command used to grant privileges to zabbix@'%'. What's the meaning of it?
Grant privileges on MariaDB?
privileges;mariadb
If the hostname is '%' it will match a connection request from any host - except localhost a pretty important distinction!In other words, if you ran the commandgrant all privileges on zabbix.* to zabbix@'%' identified by 'password';Because % is a kind of wildcard host, you might thing that means user zabbix can connect from remote machines and localhost.However if zabbix tries to connect from the same system the SQL server was running, Maria DB would deny the connection,Therefore if you truly want zabbix to be able to connect from everywhere you need to run bothgrant all privileges on zabbix.* to zabbix@'localhost' identified by 'password';andgrant all privileges on zabbix.* to zabbix@'%' identified by 'password';