bash已連接的上,但workerbench連不上,提示:
1. Failed to Connect to MySQL at 11.11.11.111:3306 through SSH tunnel at [email protected] with user root 2. Host '11.11.11.111' is not allowed to connect to this MySQL server
解決辦法(爲什麼,我也不知道):
1. 登錄mysql,一次執行以下2條語句,
1. CREATE USER 'newuser'@'11.11.11.111' IDENTIFIED BY 'password'; 2. GRANT ALL PRIVILEGES ON *.* TO 'newuser'@'11.11.11.111' WITH GRANT OPTION;
2. 在workerbench面板上,
登錄方式爲:ssh...
一個登錄用戶名是服務器的用戶(root),
一個剛開放的DB用戶(newuser),
然後填上你的公網IP和自己設置的密碼,
連接 -----> 成功