php 用mysqli 链接数据库报错:
PHP Warning: mysqli::__construct(): (HY000/2002): No such file or directory in xxx
或是 PHP Warning: mysqli::query(): Couldn't fetch mysqli
想了想应该php.ini配置的问题
将mysqli.default_socket默认为空的值配置下为 mysql的配置文件中的socket的文件的位置
本文探讨了在使用PHP的mysqli扩展连接数据库时遇到的常见错误:'No such file or directory'和'Couldn't fetch mysqli'。通过调整php.ini配置文件中mysqli.default_socket的设置,指向正确的MySQL socket文件位置,可以有效解决此类问题。
php 用mysqli 链接数据库报错:
PHP Warning: mysqli::__construct(): (HY000/2002): No such file or directory in xxx
或是 PHP Warning: mysqli::query(): Couldn't fetch mysqli
想了想应该php.ini配置的问题
将mysqli.default_socket默认为空的值配置下为 mysql的配置文件中的socket的文件的位置
9173

被折叠的 条评论
为什么被折叠?