php连接mysql时报错:SQLSTATE[HY000] [2002] No such file or directory
xianjun-li opened this issue · comments
lewis.li commented
创建PDO实例时抛出异常如下:
'message' => string 'SQLSTATE[HY000] [2002] No such file or directory'
protected 'code' => int 2002
请问知道原因吗?
AlloVince commented
检查一下MySQL DB文件挂载的路径,以及有没有写入权限