2022-08-18

phpmyadmin 5.2.0 + mariadb 10.88.0.1,檢視使用者權限時遇到"Not enough privilege to view users"(權限不足以檢視使用者)

場景:
 phpmyadmin 5.2.0
 mariadb 10.88.0.1

問題:
phpmyadmin點選使用者帳號(User accounts)頁籤時,無法顯示使用者,出現"Not enough privilege to view users"(權限不足以檢視使用者)錯誤訊息

解決方式:
執行以下語句,並重新啟動mariadb
use mysql;
INSERT INTO `tables_priv` (`Host`, `Db`, `User`, `Table_name`, `Grantor`, `Timestamp`, `Table_priv`, `Column_priv`) VALUES ('localhost','mysql','mariadb.sys','global_priv','root@localhost','0000-00-00 00:00:00','Select,Delete','');

ref:
https://stackoverflow.com/questions/60387072/not-enough-privilege-to-view-users-in-phpmyadmin