加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > PHP教程 > 正文

现在修复了这个pdo错误吗?

发布时间:2020-12-13 22:18:30 所属栏目:PHP教程 来源:网络整理
导读:Note that you can specify a port number with “port=####”,but this port number will be ignored if the host is localhost. If you want to connect to a local port other than the default, use host=127.0.0.1 instead of localhost. 从this page引

Note that you can specify a port
number with “port=####”,but this port
number will be ignored if the host is
localhost. If you want to connect to
a local port other than the default,
use host=127.0.0.1 instead of
localhost.

从this page引用,是否有人验证它是否已修复?

解决方法

那不是错误.这就是MySQL的设计方式.当主机是“localhost”时,MySQL Unix客户端使用Unix套接字而不是TCP / IP套接字进行连接,因此TCP端口无关紧要.

参考:“4.2.2. Connecting to the MySQL Server”

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读