gpt4 book ai didi

mysql - PDO异常 : SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

转载 作者:行者123 更新时间:2023-11-29 20:14:59 24 4
gpt4 key购买 nike

我正在使用 vagrant 命令行工具。在使用 vagrant up 命令后,我在运行时在浏览器中收到以下错误。

PDOException: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in Drupal\Component\DependencyInjection\PhpArrayContainer->createService() (line 79 of /drupal/docroot/core/lib/Drupal/Component/DependencyInjection/PhpArrayContainer.php).

最佳答案

请检查虚拟机内是否正在运行 mysql 服务。

服务 mysqld 状态

关于mysql - PDO异常 : SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39845401/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com