FAQ
# 01.root登录没有权限
- 修改用户权限全为Y
UPDATE user SET select_priv='Y',Insert_priv='Y',Update_priv='Y',Delete_priv='Y',Create_priv='Y',Drop_priv='Y',Reload_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',Create_tablespace_priv='Y' WHERE user='root';
1
- 刷新权限
mysql> flush privileges; # 刷新权限
mysql> quit # 退出
systemctl restart mysql # 重启服务
1
2
3
2
3
编辑 (opens new window)
上次更新: 2023/05/17, 23:08:21