1
我在數據庫服務器上運行MySQL 5.6並試圖從應用程序服務器接收數據。 (app1.example.org)當我通過FQDN指定用戶主機時,無法連接MySQL
在DB服務器上,[email protected]註冊爲用戶。
我登錄了app1.example.org(CentOS 6),並嘗試連接數據庫服務器。
[mylocalmachine]$ ssh [email protected]
...
[app1.example.org]$ mysql -u user -p -h 123.456.789.012
Enter password:
ERROR 1045 (28000): Access denied for user 'user'@'111.222.333.444' (using password: YES)
111.222.333.444與DNS中的app1.example.org相關聯。
當我向MySQL添加用戶[email protected]並再次嘗試以上時,我可以成功連接到MySQL。但我不想這樣做。
IP地址有點難記,而且有時會因IP地址應用服務器的Google Compute Engine而改變。
我想只添加用FQDN中指定主機的用戶。可能嗎?
我使用Google Cloud SQL作爲數據庫服務器,順便說一句。
哦,是的,使用靜態IP可能是很好的解決方法。謝謝 :) –