mysql随手记
grant all privileges on *.* to 'root'@'%' with grant option;
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '****' WITH GRANT OPTION;
修改root密码
1.登录mysql
> mysql -u root -p
输入密码
2.
>use mysql
重置密码
> update user set authentication_string='' where user='root';
>flush privileges;
>select user,host from user;
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '123';