1 登陆数据库
mysql -u root -p
2 use mysql;
3 select User,authentication_string,Host from user (查询用户表)
4 GRANT ALL PRIVILEGES ON *.* TO ‘root‘@‘%‘ IDENTIFIED BY ‘123456‘
5 flush privileges; (实时生效) 6 select User,authentication_string,Host from user (再次查看用户表)原文地址:https://www.cnblogs.com/MUQINGFENG123/p/11793454.html
时间: 2024-10-12 23:38:25