UPDATE USER SET PASSWORD = PASSWORD('123') WHERE HOST = 'localhost' AND USER = 'root'

SELECT USER, HOST FROM mysql.user;

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123';

FLUSH PRIVILEGES;
posted on 2025-11-30 09:52  谢晨锋  阅读(0)  评论(0)    收藏  举报