只能使用 --skip-grant-tables 参数访问 mySQL(检查所有其他线程)
Can access mySQL only with --skip-grant-tables argument (all other threads checked)
因此,在使用 --skip-grant-tables 开始时,我尝试了以下操作:
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
这给出:
ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement
然后试图绕过我发现的威胁,告诉我要这样做:
CREATE USER 'root'@'localhost' IDENTIFIED BY 'root';
FLUSH PRIVILEGES;
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;
成功了,所以我尝试更改 root 的密码,在没有 --skip-grant-tables 的情况下重新启动 mysqld 并尝试登录...使用我刚刚设置的密码拒绝访问。
然后我尝试重新创建整个 root 用户所以首先我重复上述步骤绕过 --skip-grant-tables 的限制,删除 root 用户然后做了:
INSERT INTO mysql.user
SET user = 'root',
host = 'localhost',
authentication_string = 'nDSExgwoz4ZknHdeSgBPq8Pw2L',
Select_priv = 'y',
Insert_priv = 'y',
Update_priv = 'y',
Delete_priv = 'y',
Create_priv = 'y',
Drop_priv = 'y',
Reload_priv = 'y',
Shutdown_priv = 'y',
Process_priv = 'y',
File_priv = 'y',
Grant_priv = 'y',
References_priv = 'y',
Index_priv = 'y',
Alter_priv = 'y',
Show_db_priv = 'y',
Super_priv = 'y',
Create_tmp_table_priv = 'y',
Lock_tables_priv = 'y',
Execute_priv = 'y',
Repl_slave_priv = 'y',
Repl_client_priv = 'y',
Create_view_priv = 'y',
Show_view_priv = 'y',
Create_routine_priv = 'y',
Alter_routine_priv = 'y',
Create_user_priv = 'y',
Event_priv = 'y',
Trigger_priv = 'y',
ssl_cipher = 'y',
x509_issuer = 'y',
Create_tablespace_priv = 'y',
x509_subject = 'y';
重新启动 mysqld 时没有--skip-grant-tables..仍然拒绝访问..我不知道还能尝试什么。
我放弃了,完全重装了mysql。配置错误在 sys 和 sql 数据库中..
因此,在使用 --skip-grant-tables 开始时,我尝试了以下操作:
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
这给出:
ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement
然后试图绕过我发现的威胁,告诉我要这样做:
CREATE USER 'root'@'localhost' IDENTIFIED BY 'root';
FLUSH PRIVILEGES;
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;
成功了,所以我尝试更改 root 的密码,在没有 --skip-grant-tables 的情况下重新启动 mysqld 并尝试登录...使用我刚刚设置的密码拒绝访问。
然后我尝试重新创建整个 root 用户所以首先我重复上述步骤绕过 --skip-grant-tables 的限制,删除 root 用户然后做了:
INSERT INTO mysql.user
SET user = 'root',
host = 'localhost',
authentication_string = 'nDSExgwoz4ZknHdeSgBPq8Pw2L',
Select_priv = 'y',
Insert_priv = 'y',
Update_priv = 'y',
Delete_priv = 'y',
Create_priv = 'y',
Drop_priv = 'y',
Reload_priv = 'y',
Shutdown_priv = 'y',
Process_priv = 'y',
File_priv = 'y',
Grant_priv = 'y',
References_priv = 'y',
Index_priv = 'y',
Alter_priv = 'y',
Show_db_priv = 'y',
Super_priv = 'y',
Create_tmp_table_priv = 'y',
Lock_tables_priv = 'y',
Execute_priv = 'y',
Repl_slave_priv = 'y',
Repl_client_priv = 'y',
Create_view_priv = 'y',
Show_view_priv = 'y',
Create_routine_priv = 'y',
Alter_routine_priv = 'y',
Create_user_priv = 'y',
Event_priv = 'y',
Trigger_priv = 'y',
ssl_cipher = 'y',
x509_issuer = 'y',
Create_tablespace_priv = 'y',
x509_subject = 'y';
重新启动 mysqld 时没有--skip-grant-tables..仍然拒绝访问..我不知道还能尝试什么。
我放弃了,完全重装了mysql。配置错误在 sys 和 sql 数据库中..