layout: post
title: Mysql数据库问题归集
date: 2018-03-29
tags: [“Mariadb”,”软件服务”]
1、Mysql管理员root没有grant权限
登录mysql更新mysql.user表
MariaDB [(none)]> select * from mysql.user where user='root' \G
*************************** 1. row ***************************
Host: %
User: root
Password: *E56A114692FE0DE073F9A1DD68A00EEB9703F3F1
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: N
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
ssl_type:
ssl_cipher:
x509_issuer:
x509_subject:
max_questions: 0
max_updates: 0
max_connections: 0
max_user_connections: 0
plugin:
authentication_string:
password_expired: N
is_role: N
default_role:
max_statement_time: 0.000000
1 row in set (0.00 sec)
#更新"Grant_priv"的值为"Y"
MariaDB [(none)]> select Grant_priv from mysql.user \G
MariaDB [(none)]> flush privileges;
#退出重新登录可以使用"grant"
文档更新时间: 2020-05-25 12:16 作者:张尚