我有我的本地Windows PC(Windows 7)上安裝的MySQL。現在我有一個程序,與數據庫互動,並給我結果。很好,當我在本地有mysql的同一臺機器上運行它時。
現在我從不同的機器上遠程運行程序它給了我一些錯誤的顯示below.I已正確設置rmeote機器名和port.And我能夠平安MySQL服務器的機器與其他mahachine遠程連接到mysql服務器的錯誤,但本地工作正常
java.sql.SQLException: null, message from server: "Host 'remote-pc-name' is not allowed to connect to this MySQL server"
谷歌搜索後,我發現:
Make sure that the server has not been configured to ignore network connections or (if you are attempting to connect remotely) that it has not been configured to listen only locally on its network interfaces. If the server was started with --skip-networking, it will not accept TCP/IP connections at all. If the server was started with --bind-address=127.0.0.1, it will listen for TCP/IP connections only locally on the loopback interface and will not accept remote connections
。
現在,如果要做到這一點,我可以在哪裏做到這一點?哪個屬性我應該改變爲哪個值。哪個文件我應該改變,我應該改變什麼?
你對遠程機器有管理員權限嗎? –
檢查'mysql數據庫,表用戶,數據庫' – ajreal
是的,我做的一切都很好 – akshay