update mysql.user set Password = PASSWORD(‘密码‘) where User = ‘root‘;
flush privileges;
select password(‘密码‘);
create user ‘用户名‘@‘主机名‘ identified by ‘密码‘
grant all on *.* to ‘用户名‘@‘主机名‘;
grant select,insert on *.* to ‘用户名‘@‘主机名‘;
grant all on db.* to ‘用户名‘@‘主机名‘;
grant select,insert on db.* to ‘用户名‘@‘主机名‘;
时间: 2024-10-14 08:00:26