我使用--skip-grant-tables选项登录了MySQL。但是我不知道如何将所有权限还原给root用户。
我尝试过:
GRANT ALL PRIVILEGES ON * . * TO 'root'@'localhost';
MySQL 说:
# 1290 - The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement
尝试:
GRANT ALL PRIVILEGES ON * . * TO 'root'@'localhost'
WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0
MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;
MySQL 说:
# 1290 - The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement