mysql8初始化及账户管理
查看初始密码: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地址';
本文来自博客园,作者:zk01,转载请注明原文链接:https://www.cnblogs.com/zhangxiaokui/p/16848303.html