我对MySQL Server8有一个问题。
嗯,我不小心取消了root'@'localhost上的所有特权,现在我什么也做不了了……
我需要启动mysql服务的安全模式或与“--跳过-授予表”,但事情是我甚至不能启动服务在命令行,当我输入"mysqld“或"mysqld_safe”或"mysqld --跳过授予-表“什么都没有发生,它只是跳过行。
请保存在我的这是MySQL服务器8.0,我不能只是把跳过授权表和我的配置/ini文件的结尾...
发布于 2020-03-28 18:54:59
insert into user (Host, User, authentication_string, Select_priv, Insert_priv, Update_priv, Delete_priv, Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv, File_priv, Grant_priv, References_priv, Index_priv, Alter_priv, Show_db_priv, Super_priv, Create_tmp_table_priv, Lock_tables_priv, Execute_priv, Repl_slave_priv, Repl_client_priv, Create_view_priv, Show_view_priv, Create_routine_priv, Alter_routine_priv, Create_user_priv, ssl_type, ssl_cipher, x509_issuer, x509_subject, max_questions, max_updates, max_connections, max_user_connections)
values('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','','0','0','0','0');你需要来阅读这些问题,答案,特别是评论!
How can I restore the MySQL root user’s full privileges?
Restoring deleted 'root' user and password for MySQL
人们已经对更新版本的MySQL如何更新/在哪里更新/更改留下了评论,但从本质上讲,这应该会让你工作起来。
每个链接上的第一个答案和评论应该会给你你需要的东西。
https://stackoverflow.com/questions/60899628
复制相似问题