终端连接mysql
1: cd /usr/local/mysql/
2: mysql -uroot -p
3: #使用对应数据库
use mysql
4: #特定用户的host 修改
mysql > update user set host=‘%’ where user=‘root’;
#指定用户的权限
mysql > grant all privileges on test.* to root@‘%’
解决问题1044 - Access denied for user ‘root‘@‘localhost‘ to database
于 2023-04-11 14:05:13 首次发布