查看初始密码:grep 'temporary password' mysqld.log
mysql> alter user 'root'@'localhost' identified by '密码';
mysql> update mysql.user set host="%" where user="root";
创建用户:
mysql> create user 'zk'@'%' identified by '密码';
授权
mysql> grant all privieges on * to 'zk'@'%';
grant insert on world.* to '用户名'@'IP地址';
flush privileges;
SHOW GRANTS for szzf;
删除授权
revoke all privileges from 数据库 to '用户名'@'IP地址';
标签:初始化,zk,mysql8,IP地址,账户,user,mysql,root From: https://www.cnblogs.com/zhangxiaokui/p/16848303.html