【linux】Can't connect to MySQL server on 'XXX' (13)問題解決方式
今天自己裝了個虛擬機器,配置了liunx環境,將程式碼原封挪到虛擬機器上,竟然連不上遠端資料庫,一直報這個錯誤:SQLSTATE[HY000] [2003] Can't connect to MySQL server on 'XXX' (13),
網上搜了一下是因為httpd無法訪問遠端資料庫,解決方法如下:
命令列輸入:
getsebool -a | grep httpd
結果中有此項:httpd_can_network_connect_db --> off
解決方案:
命令列輸入:/usr/sbin/setsebool -P httpd_can_network_connect_db on
相關文章
- MySQL問題記錄--Can't connect to MySQL server on localhost (10061)解決方法MySqlServerlocalhost
- 解決Can 't connect to local MySQL server through socket '/tmp/mysql.sock '(2) "MySqlServer
- MySQL連線提示Can't connect to local MySQL server through socketMySqlServer
- Can't connect to local MySQL server through socket '/tmp/mysql.sock'MySqlServer
- 上手MySQL之解決問題:not allowed to connect to this MySQL serverMySqlServer
- Mysql:Variable 'XXXt' can't be set to the value of 'NULL'解決MySqlNull
- Navicat 連線 MySQL 失敗:2002-can‘t connect to server on localhost(10061)問題解決MySqlServerlocalhost
- linux上“rman can't open target”問題解決Linux
- 異常:Can't connect to MySQL server (10060)MySqlServer
- Host 'xxx' is not allowed to connect to this MySQL server 解決方法MySqlServer
- Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)解決方法MySqlServer
- 解決can't find -lGL的問題
- Can't Connect to MySQL Server on IP Address (10061) 錯誤的解決方案MySqlServer
- 連線MySQL錯誤:Can't connect to MySQL server (10060)MySqlServer
- MySQL 2003 - Can’t connect to MySQL server on (10060)MySqlServer
- [jenkins]Can’t connect to window server – not enough permissionsJenkinsServer
- Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock錯誤MySqlServer
- Can't connect to X11 window server usingServer
- mysqldump: Got error: 2002: Can't connect to local MySQL server through.....MySqlGoErrorServer
- MySQL 5.5 關閉資料庫報錯"Can't connect to local MySQL server through socket"MySql資料庫Server
- “Host ‘xxxx‘ is not allowed to connect to this MySQL server“MySqlServer
- MySQL報錯'ERROR 2002 (HY000): Can't connect to local MySQL server through'MySqlErrorServer
- mysql can't connect error about privilege----not root userMySqlError
- 解決MySql報錯:1130 - Host ‘xxx‘ is not allowed to connect to this MySQL server的方法MySqlServer
- 解決問題:Variable 'time_zone' can't be set to the value of 'NULL'Null
- Can't connect to X11 window server using DISPLAY variableServer
- mysql 啟動報錯Can't connect to local MySQL server through socket '/data/mysql/mysql/mysql.sock'(111)MySqlServer
- Host 'xxx' is not allowed to connect to this MySQL server.MySqlServer
- ERROR 2002 (HY000): Can't connect server socket /tmp/mysql.sockErrorServerMySql
- Can't connect to X11 window server using '127.0.0.1:0.0'Server127.0.0.1
- ERROR 2003 (HY000)Can't connect to MySQL server on '192.168.8.247' (113)ErrorMySqlServer
- ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)ErrorMySqlServerlocalhost
- 解決svnserve: Can't bind server socket: Address already in useServer
- 問題解決zipimport.ZipImportError: can‘t decompress data; zlib not availablImportErrorAI
- python報錯問題解決:'ascii' codec can't encode characterPythonASCII
- MySQL不能啟動 Can't start server : Bind on unix sockeMySqlServer
- Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.Server
- java.lang.InternalError: Can't connect to X11 window server using ':0.0' asJavaErrorServer