标签:mysql
重置mysql密码:
mysqladmin -uroot password ‘123‘ 增加用户
在配置文件增加:vim /etc/my.cnf
skip-grant
重启mysql:/etc/init.d/mysqld restart
use mysql
update user set password=password(‘新密码‘) where user=‘root‘
select * from user where user=‘root‘\G;
创建用户和密码
mysql -uroot -e "grant all on *.* to ‘zabbix‘@‘localhost‘ identified by ‘zabbix‘";
标签:mysql
原文地址:http://mengbo2006214.blog.51cto.com/6687714/1774828