SQLSTATE[HY000] [2003] Can't connect to MySQL server on 'XXX' (13)
来源:互联网 发布:淘宝卖家申请直播条件 编辑:程序博客网 时间:2024/05/21 09:50
通过php的mysql_connect('localhost','usr','pass')连接本地数据库成功
但是,mysql_connect('127.0.0.1:3306','usr','pass')出现
can't connect to MySQL server using '' (13)的错误
原因:
#getsebool -a | grep httpd
[neo@neo phpMyTest]$ getsebool -a | grep httpd
allow_httpd_anon_write --> off
allow_httpd_mod_auth_ntlm_winbind --> off
allow_httpd_mod_auth_pam --> off
allow_httpd_sys_script_anon_write --> off
httpd_builtin_scripting --> on
httpd_can_check_spam --> off
httpd_can_network_connect --> off
httpd_can_network_connect_cobbler --> off
httpd_can_network_connect_db --> off
httpd_can_network_memcache --> off
httpd_can_network_relay --> off
httpd_can_sendmail --> off
httpd_dbus_avahi --> on
httpd_enable_cgi --> on
httpd_enable_ftp_server --> off
httpd_enable_homedirs --> off
httpd_execmem --> off
httpd_read_user_content --> off
httpd_setrlimit --> off
httpd_ssi_exec --> off
httpd_tmp_exec --> off
httpd_tty_comm --> on
httpd_unified --> off
httpd_use_cifs --> off
httpd_use_gpg --> off
httpd_use_nfs --> off
发现 httpd_can_network_connect --> off
解决方案:
转载请注明(B5教程网)原文链接:http://www.bcty365.com/content-35-592-1.html
0 0
- SQLSTATE[HY000] [2003] Can't connect to MySQL server on 'XXX' (13)
- SQLSTATE[HY000] [2003] Can\'t connect to MySQL server on \'XXX\' (13)
- SQLSTATE[HY000] [2003] Can't connect to MySQL server on 'XXX'
- MySQL 数据库连接失败 SQLSTATE[HY000] [2003] Can't connect to MySQL server on '127.0.0.1' (13)
- MySQL 数据库连接失败 SQLSTATE[HY000] [2003] Can't connect to MySQL server on '127.0.0.1' (13)
- SQLSTATE[HY000] [2003] Can't connect to MySQL server on '*.*.*.*' (13)
- ERROR 2003 (HY000): Can't connect to MySQL server on 'xxx.xxx.xxx.xxx' (111)
- ERROR 2003 (HY000): Can't connect to MySQL server on 'xxx.xxx.xx.xxx' (111)
- MySQL Centos7 数据库连接失败 SQLSTATE[HY000] [2003] Can't connect to MySQL server on '127.0.0.1' (13)
- ERROR 2003 (HY000): Can't connect to MySQL server on
- Mysql 报错:ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.xxx.xxx' (111)
- Can't connect to MySQL server on 'xxx' (13)
- Can't connect to MySQL server on 'XXX' (13)
- Can't connect to MySQL server on 'xxx.xxx.xxx.xxx' (10061),错误代码2003
- mysql绿色版安装问题解决(ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061))
- MySQL远程连接ERROR 2003 (HY000):Can't connect to MySQL server on'XXXXX'的问题
- Mysql启动报错:ERROR 2003 (HY000) Can't connect to MySQL server on 'localhost' (10061)
- MySQL远程连接ERROR 2003 (HY000):Can't connect to MySQL server on'XXXXX'的问题
- ThreadLocal
- Android延时加载两种方式
- cocos2dx 读取json及解析
- asp.net--TextBox属性全研究
- 安卓学习之Activity
- SQLSTATE[HY000] [2003] Can't connect to MySQL server on 'XXX' (13)
- CentOS安装rpcapd服务(WinPcap)
- man 手册的用法() 章节号
- android 一进入view就弹出软键盘的问题
- FZU2127:养鸡场
- android 二次开发 莫名其妙问题二(调用百度离线地图)
- OpenCV人脸检测整理
- 奔小康赚大钱 hdu 2255
- ARM GCC汇编伪指令