mysql> CREATE USER 'root'@'%' IDENTIFIED BY 'Hadoop3!'; Query OK, 0 rows affected (0.04 sec) mysql> grant all privileges on *.* to 'root'@'%'; Query OK, 0 rows affected (0.03 sec)
另外,如果遠程連接的時候報plugin caching_sha2_password could not be loaded這個錯誤,可以嘗試修改密碼加密插件:
mysql> alter user 'root'@'%' identified with mysql_native_password by 'Hadoop3!';