linux mysql 8.0问题

  1.  Access denied for user 'root'@'localhost' (using password: YES)

  停止服务:service mysqld stop

  免密登录:vim /etc/my.ini  添加skip-grant-tables

  执行命令:mysql -u root 

  修改密码:alter use 'root'@'localhost' identified by 'new_password'

      发现错误The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement : set global read_only=0;//(关掉新主库的只读属性)

      flush privileges

   重启服务:service mysql restart

posted @ 2022-03-11 11:59  angryCoder996  阅读(32)  评论(0编辑  收藏  举报