Mysql2::Error: Can't connect to local MySQL server through socket '/var/run/mysqld/mysql.sock' (2)
我验证了/etc/mysqld/my.cnfis /var/run/mysqld/mysql.sock中的套接字位置,这也与database.yml配置相匹配。
我已经安装了XAMPP,我的cakephp项目文件夹位于htdocs(/opt/lampp/htdocs/cakephp)中。PHP Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock
我有一个cakephp应用程序在我的本地机器(mac )上运行了一段时间,然后我突然意识到我无法连接到mysql.sock。/function.mysql-connect]: [2002] No such file or directory (trying to connect via unix:///var/mysql/mysql.sock$config['port'], $config['login'], $config['password
Can't connect to local MySQL server through socket ' 现在我在ubuntu上运行xampp当我运行phpinfo时,它告诉我mysqld.sock位于: /opt/lampp/var/mysql/mysql.sock。
我不确定php_cli模块是否从不同的ini文件或类似文件中读取。
我最近安装了xamppv3.2.2。启动apache和mysql,当我尝试访问php时,我的管理员出现了一个错误#2002 - No connection could be made because the target machine actively refused it.mysqli_real_connect(): (HY000/2002): N