When you create a MySQL account, the hostname is important. Many people will use something like 'zabbix'@'%', but this should be used only if the MySQL database is on a different physical server from the web application. For a local connection, you'll want to use 'zabbix'@'localhost'. Of course, there's no reason why you cannot use both.
Here's how:
- Connect to MySQL Server as an administrator (or as
root). If doing this from Terminal, you can type:
sudo mysql
- Once connected to MySQL, create the user account:
CREATE USER 'zabbix'@'localhost' IDENTIFIED WITH mysql_native_password BY 'superSecretPassword!123';
Note: Be sure to replace superSecretPassword!123 with a proper password. You can reuse the same password as was used for 'zabbix'@'%' if you would like.
- Ensure the new account has all the permissions necessary to work with the necessary database(s):
GRANT ALL ON `zabbix`.* TO 'zabbix'@'localhost';
- Disconnect from MySQL:
exit
That's all there is to it