且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在PHP中创建与PDO的连接时出错

更新时间:2022-11-05 17:37:31

通常意味着您需要指定TCP/IP(1),或告诉MySQL Unix套接字在哪里(2):

Usually means that you need to specify TCP/IP (1), or tell MySQL where your Unix socket is (2):

  1. "mysql:host = 127.0.0.1"或"mysql:host = localhost; port = 3306"
  2. "mysql:unix_socket =/var/run/mysqld/mysqld.sock"