https://blog.csdn.net/tornge/article/details/51388233

找到mysql sokcet的路径

vim /etc/mysql/mysql.conf.d/mysqld.cnf 
socket          = /var/run/mysqld/mysqld.sock

在php.ini中关于mysql的socket路径的地方,修改如如下

[Pdo_mysql]
; If mysqlnd is used: Number of cache slots for the internal result set cache
; http://php.net/pdo_mysql.cache_size
pdo_mysql.cache_size = 2000

; Default socket name for local MySQL connects.  If empty, uses the built-in
; MySQL defaults.
; http://php.net/pdo_mysql.default-socket
pdo_mysql.default_socket=/var/run/mysqld/mysqld.sock

 



相关文章:

  • 2022-12-23
  • 2021-11-29
  • 2022-12-23
  • 2022-12-23
  • 2021-08-18
  • 2022-12-23
  • 2021-04-25
  • 2021-10-09
猜你喜欢
  • 2022-12-23
  • 2021-09-27
  • 2022-12-23
  • 2021-12-28
  • 2021-06-26
相关资源
相似解决方案