I followed the instruction to install zabbix_server_mysql 3.2
in Ubuntu16
.
wget http://repo.zabbix.com/zabbix/3.2/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.2-1+xenial_all.deb
dpkg -i zabbix-release_3.2-1+xenial_all.deb
apt-get update
apt-get install zabbix-server-mysql zabbix-frontend-php
After complete to install, I try to connect mysql
for the next instruction like below.
Creating initial database
Create Zabbix database and user on MySQL by the following commands, where <root_password> shall be replaced with the actual root password (e.g., shell> mysql -uroot -p12345) and <password> with new password for zabbix user on the database (including apostrophes: …identified by '67890';):
shell> mysql -uroot -p<root_password>
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by '<password>';
mysql> quit;
It is saying I need to type the actual root's password even though I have never set root password while installing zabbix_server_mysql
.
At the first I tried to assume default password like empty string "", "root" and "zabbix" something.
Then I tried to change root password to what I want.
$sudo service mysql stop
$sudo mysqld_safe --skip-grant-tables
# Another terminal
$mysql -uroot mysql
mysql > update user set password=PASSWORD("root") where User='root';
mysql > flush privileges;
mysql > quit;
$ sudo service mysql restart
$ mysql -uroot -proot
ERROR 1698 (28000): Access denied for user 'root'@'localhost'
Unfortunately, these seem not to work as I don't know why.
I have been stuck for quite long time, even not starting zabbix
at all.
Could you give me an advice ?
Edit -------------------------------------------------
dpkg -l | grep mysql
ii libdbd-mysql-perl 4.033-1ubuntu0.1 amd64 Perl5 database interface to the MySQL database
ii libmysqlclient20:amd64 5.7.17-0ubuntu0.16.04.1 amd64 MySQL database client library
ii mysql-common 5.7.17-0ubuntu0.16.04.1 all MySQL database common files, e.g. /etc/mysql/my.cnf
ii php-mysql 1:7.0+35ubuntu6 all MySQL module for PHP [default]
ii php7.0-mysql 7.0.13-0ubuntu0.16.04.1 amd64 MySQL module for PHP
ii zabbix-server-mysql 1:3.2.3-1+xenial amd64 Zabbix network monitoring solution - server (MySQL)