php连接mysql数据库报No such file or directory错误

原文链接:http://www.cnblogs.com/moonbear/archive/2012/12/17/2822053.html

mysql_connect 连接数据库时报No such file or directory错误,原因是mac下的默认php.ini配置default_socket 在/var/mysql/mysql.socket,而后安装的mysql的socket文件大多在/tmp/mysql.socket,可以在mysql控制台执行status命令查看UNIX socket的位置,将php.ini中关于default_socket的配置修改过来就可以解决这个问题。

转载于:https://www.cnblogs.com/moonbear/archive/2012/12/17/2822053.html

展开阅读全文
博主设置当前文章不允许评论。

docker run找不到容器?报no such file or directory

11-18

新手学习遇到问题。rnrn参考:http://dockerpool.com/static/books/docker_practice/image/pull.html 安装的。rn虚拟机系统:CentOS6rn内核:RHEL2.6.32-358.el6.x86_64rn是不是内核的版本太低了?rnrn[b][root@localhost etc]# docker run -t -i ubuntu:14.04 /bin/bash[/b]rnError response from daemon: Cannot start container 0b1186a32c194decbcee2e8d470ff2af9dd48a5a9d4f74edc9fa0d9ee6d9b2a7: no such file or directoryrnrn[b][root@localhost etc]# docker images[/b]rnREPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZErnubuntu 14.04 ca4d7b1b9a51 8 days ago 187.9 MBrnubuntu 12.04 04c3793b1229 8 days ago 136 MBrnrn[b][root@localhost etc]# docker ps -a[/b]rnCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMESrn0b1186a32c19 ubuntu:14.04 "/bin/bash" 7 minutes ago high_tesla rna37bd98ba0b1 ubuntu:12.04 "/bin/sh" 5 days ago lonely_torvalds rnf43809cdcf89 ubuntu:14.04 "/bin/echo 'Hello wo 6 days ago reverent_einstein rnrn[b][root@localhost etc]# docker info[/b]rnContainers: 11rnImages: 8rnStorage Driver: devicemapperrn Pool Name: docker-8:2-141133-poolrn Pool Blocksize: 65.54 kBrn Backing Filesystem: extfsrn Data file: /dev/loop0rn Metadata file: /dev/loop1rn Data Space Used: 251.2 MBrn Data Space Total: 107.4 GBrn Data Space Available: 4.683 GBrn Metadata Space Used: 1.43 MBrn Metadata Space Total: 2.147 GBrn Metadata Space Available: 2.146 GBrn Udev Sync Supported: truern Deferred Removal Enabled: falsern Data loop file: /var/lib/docker/devicemapper/devicemapper/datarn Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadatarn[color=#FF6600] Library Version: 1.02.95-RHEL6 (2015-09-08)[/color]rnExecution Driver: lxc-1.0.7rnLogging Driver: json-filernKernel Version: 2.6.32-358.el6.x86_64rnOperating System: rnCPUs: 1rnTotal Memory: 988.8 MiBrnName: localhost.localdomainrnID: G6RJ:WDPM:U7WM:O335:RUBW:ARHY:G7PB:7MVT:4IQP:MIIL:HDUZ:XD7Vrnrn[b][root@localhost etc]# docker version[/b]rnClient version: 1.7.1rnClient API version: 1.19rnGo version (client): go1.4.2rnGit commit (client): 786b29d/1.7.1rnOS/Arch (client): linux/amd64rnServer version: 1.7.1rnServer API version: 1.19rnGo version (server): go1.4.2rnGit commit (server): 786b29d/1.7.1rnOS/Arch (server): linux/amd64rnrnrn不太懂为什么报“no such file or directory”,望高手指点~~rn 论坛

php ---〉〉〉failed to open stream: No such file or directory in

06-21

Warning: include_once(/myblog/common/error.inc) [function.include-once]: failed to open stream: No such file or directory in D:\Apache Group\Apache2\htdocs\myblog\common\common.inc on line 16rnrnWarning: include_once() [function.include]: Failed opening '/myblog/common/error.inc' for inclusion (include_path='.;C:\php5\pear') in D:\Apache Group\Apache2\htdocs\myblog\common\common.inc on line 16rnrnWarning: include_once(/myblog/common/baseDatabase.inc) [function.include-once]: failed to open stream: No such file or directory in D:\Apache Group\Apache2\htdocs\myblog\common\common.inc on line 17rnrnWarning: include_once() [function.include]: Failed opening '/myblog/common/baseDatabase.inc' for inclusion (include_path='.;C:\php5\pear') in D:\Apache Group\Apache2\htdocs\myblog\common\common.inc on line 17rnrnWarning: include_once(/myblog/common/baseTable.inc) [function.include-once]: failed to open stream: No such file or directory in D:\Apache Group\Apache2\htdocs\myblog\common\common.inc on line 18rnrnWarning: include_once() [function.include]: Failed opening '/myblog/common/baseTable.inc' for inclusion (include_path='.;C:\php5\pear') in D:\Apache Group\Apache2\htdocs\myblog\common\common.inc on line 18rnrnWarning: include_once(/myblog/common/category.inc) [function.include-once]: failed to open stream: No such file or directory in D:\Apache Group\Apache2\htdocs\myblog\common\common.inc on line 19rnrnWarning: include_once() [function.include]: Failed opening '/myblog/common/category.inc' for inclusion (include_path='.;C:\php5\pear') in D:\Apache Group\Apache2\htdocs\myblog\common\common.inc on line 19rnrnWarning: include_once(/myblog/common/blog.inc) [function.include-once]: failed to open stream: No such file or directory in D:\Apache Group\Apache2\htdocs\myblog\common\common.inc on line 20rnrnWarning: include_once() [function.include]: Failed opening '/myblog/common/blog.inc' for inclusion (include_path='.;C:\php5\pear') in D:\Apache Group\Apache2\htdocs\myblog\common\common.inc on line 20rnrnWarning: include_once(/myblog/common/links.inc) [function.include-once]: failed to open stream: No such file or directory in D:\Apache Group\Apache2\htdocs\myblog\common\common.inc on line 21rnrnWarning: include_once() [function.include]: Failed opening '/myblog/common/links.inc' for inclusion (include_path='.;C:\php5\pear') in D:\Apache Group\Apache2\htdocs\myblog\common\common.inc on line 21rnrnWarning: include_once(/myblog/common/page.inc) [function.include-once]: failed to open stream: No such file or directory in D:\Apache Group\Apache2\htdocs\myblog\common\common.inc on line 22rnrnWarning: include_once() [function.include]: Failed opening '/myblog/common/page.inc' for inclusion (include_path='.;C:\php5\pear') in D:\Apache Group\Apache2\htdocs\myblog\common\common.inc on line 22rnrnWarning: include_once(/myblog/common/system.inc) [function.include-once]: failed to open stream: No such file or directory in D:\Apache Group\Apache2\htdocs\myblog\common\common.inc on line 23rnrnWarning: include_once() [function.include]: Failed opening '/myblog/common/system.inc' for inclusion (include_path='.;C:\php5\pear') in D:\Apache Group\Apache2\htdocs\myblog\common\common.inc on line 23rnrnWarning: include_once(/myblog/common/user_info.inc) [function.include-once]: failed to open stream: No such file or directory in D:\Apache Group\Apache2\htdocs\myblog\common\common.inc on line 24rnrnWarning: include_once() [function.include]: Failed opening '/myblog/common/user_info.inc' for inclusion (include_path='.;C:\php5\pear') in D:\Apache Group\Apache2\htdocs\myblog\common\common.inc on line 24rnrnFatal error: Class 'BaseTable' not found in D:\Apache Group\Apache2\htdocs\myblog\common\evaluation.inc on line 8rnrnrnrnrn文件夹的权限已改rn求助 谢谢! 论坛

github ssh配置的时候No such file or directory错误

03-09

@DESKTOP-I57JE8S MINGW64 /f/Hololens/GitHub/2Drn$ ssh-keygen -t rsa -C "xxx@live.com";rnGenerating public/private rsa key pair.rnEnter file in which to save the key (/c/Users/lijp/.ssh/id_rsa):rn/c/Users/lijp/.ssh/id_rsa already exists.rnOverwrite (y/n)?rnrn@DESKTOP-I57JE8S MINGW64 /f/Hololens/GitHub/2Drn$ ssh -T git@github.comrnThe authenticity of host 'github.com (192.30.253.113)' can't be established.rnRSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.rnAre you sure you want to continue connecting (yes/no)?rnHost key verification failed.rnrnyuway@DESKTOP-I57JE8S MINGW64 /f/Hololens/GitHub/2Drn$ ssh -vT git@github.comrnOpenSSH_7.3p1, OpenSSL 1.0.2j 26 Sep 2016rndebug1: Reading configuration data /etc/ssh/ssh_configrndebug1: Connecting to github.com [192.30.253.113] port 22.rndebug1: Connection established.rndebug1: identity file /c/Users/lijp/.ssh/id_rsa type 1rndebug1: key_load_public: No such file or directoryrndebug1: identity file /c/Users/lijp/.ssh/id_rsa-cert type -1rndebug1: key_load_public: No such file or directoryrndebug1: identity file /c/Users/lijp/.ssh/id_dsa type -1rndebug1: key_load_public: No such file or directoryrndebug1: identity file /c/Users/lijp/.ssh/id_dsa-cert type -1rndebug1: key_load_public: No such file or directoryrndebug1: identity file /c/Users/lijp/.ssh/id_ecdsa type -1rndebug1: key_load_public: No such file or directoryrndebug1: identity file /c/Users/lijp/.ssh/id_ecdsa-cert type -1rndebug1: key_load_public: No such file or directoryrndebug1: identity file /c/Users/lijp/.ssh/id_ed25519 type -1rndebug1: key_load_public: No such file or directoryrndebug1: identity file /c/Users/lijp/.ssh/id_ed25519-cert type -1rndebug1: Enabling compatibility mode for protocol 2.0rndebug1: Local version string SSH-2.0-OpenSSH_7.3rndebug1: Remote protocol version 2.0, remote software version libssh-0.7.0rndebug1: no match: libssh-0.7.0rndebug1: Authenticating to github.com:22 as 'git'rndebug1: SSH2_MSG_KEXINIT sentrndebug1: SSH2_MSG_KEXINIT receivedrndebug1: kex: algorithm: curve25519-sha256@libssh.orgrndebug1: kex: host key algorithm: ssh-rsarndebug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: compression: nonerndebug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: compression: nonerndebug1: expecting SSH2_MSG_KEX_ECDH_REPLYrndebug1: Server host key: ssh-rsa SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5 SY8rnThe authenticity of host 'github.com (192.30.253.113)' can't be established.rnRSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.rnAre you sure you want to continue connecting (yes/no)?rnHost key verification failed.rnrnrnrn已经将 id_rsa.pub 的内容添加到 github 设置里了.rnrn求帮助. 论坛

没有更多推荐了,返回首页