账号:Admin
密码:zabbix
改mysql密码:
忘记了选择直接跳过,
vim /etc/my.conf
(添加) skip-grant-tables
重启 #systemctl restart mysqld
#mysql -uroot -p
直接Enter,密码不用输,再次Enter
最后成功进入mysql
改密码:注意版本号
mysql8.0 :
flush privileges;
ALTER USER ‘root’@‘localhost’ IDENTIFIED WITH mysql_native_password BY ‘密码’;
mysql5.7:
update mysql.user set authentication_string=PASSWORD(“123456”) where user=“root” and host=“localhost”;
再将 /etc/my.conf 里 skip-grant-tables 删掉,重启mysql,修改密码完成;
(记得旧密码,改新密码:
mysqladmin -uroot -p’旧密码’ password '新密码’;)
接着改的是zabbix的密码:
mysql> set password for zabbix@localhost = password(‘新密码’);
FLUSH PRIVILEGES;