提示意思是不能用grant創建用戶,mysql8.0以前的版本可以使用grant在授權的時候隱式的創建用戶,8.0以后已經不支持,所以必須先創建用戶,然后再授權,命令如下:
mysql> create user 'zabbix'@'localhost' IDENTIFIED BY '111111'; Query OK, 0 rows affected (0.04 sec) mysql> grant all privileges on *.* to 'zabbix'@'localhost'
; Query OK, 0 rows affected (0.03 sec)
另外,如果遠程連接的時候報plugin caching_sha2_password could not be loaded這個錯誤,可以嘗試修改密碼加密插件:
mysql> alter user 'zabbix'@'localhost' identified with mysql_native_password by '111111';