修正mysql-ERROR 1698 (28000): Access denied for user ‘root’@’localhost’

sudo mysql -u root
MariaDB [mysql]>GRANT ALL PRIVILEGES ON *.* TO 'root'@'web.server.ip.address';
MariaDB [mysql]>GRANT USAGE ON *.* TO 'root'@'web.server.ip.address' WITH GRANT OPTION;
MariaDB [mysql]>use mysql;
MariaDB [mysql]>update user set plugin='' where User='root';
MariaDB [mysql]>flush privileges;
MariaDB [mysql]> exit
THE END
分享
二维码
< <上一篇
下一篇>>