layout: post
title: Mysql数据库问题归集
date: 2018-03-29
tags: [“Mariadb”,”软件服务”]


1、Mysql管理员root没有grant权限

登录mysql更新mysql.user表

  1. MariaDB [(none)]> select * from mysql.user where user='root' \G
  2. *************************** 1. row ***************************
  3. Host: %
  4. User: root
  5. Password: *E56A114692FE0DE073F9A1DD68A00EEB9703F3F1
  6. Select_priv: Y
  7. Insert_priv: Y
  8. Update_priv: Y
  9. Delete_priv: Y
  10. Create_priv: Y
  11. Drop_priv: Y
  12. Reload_priv: Y
  13. Shutdown_priv: Y
  14. Process_priv: Y
  15. File_priv: Y
  16. Grant_priv: N
  17. References_priv: Y
  18. Index_priv: Y
  19. Alter_priv: Y
  20. Show_db_priv: Y
  21. Super_priv: Y
  22. Create_tmp_table_priv: Y
  23. Lock_tables_priv: Y
  24. Execute_priv: Y
  25. Repl_slave_priv: Y
  26. Repl_client_priv: Y
  27. Create_view_priv: Y
  28. Show_view_priv: Y
  29. Create_routine_priv: Y
  30. Alter_routine_priv: Y
  31. Create_user_priv: Y
  32. Event_priv: Y
  33. Trigger_priv: Y
  34. Create_tablespace_priv: Y
  35. ssl_type:
  36. ssl_cipher:
  37. x509_issuer:
  38. x509_subject:
  39. max_questions: 0
  40. max_updates: 0
  41. max_connections: 0
  42. max_user_connections: 0
  43. plugin:
  44. authentication_string:
  45. password_expired: N
  46. is_role: N
  47. default_role:
  48. max_statement_time: 0.000000
  49. 1 row in set (0.00 sec)
  50. #更新"Grant_priv"的值为"Y"
  51. MariaDB [(none)]> select Grant_priv from mysql.user \G
  52. MariaDB [(none)]> flush privileges;
  53. #退出重新登录可以使用"grant"

 

文档更新时间: 2020-05-25 12:16   作者:张尚