我正在尝试在客户端服务器上进行symfony项目的生产。 该网站的工作我们公司的服务器上很好,但现在我有这样的错误:主义(在symfony项目中)无法通过套接字连接
500 | Internal Server Error | Doctrine_Connection_Exception
PDO Connection Error: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
这里是database.yml中:
all:
doctrine:
class: sfDoctrineDatabase
param:
dsn: 'mysql:host=localhost;dbname=24DLJLRR1'
username: xxxxxxxxxx
password: xxxxxxxxxx
而且,如果我尝试测试的mysql_connect:
<?php
mysql_connect("localhost", "xxxxxxxxxx", "xxxxxxxxxx");
mysql_select_db("24DLJLRR1");
$answer = mysql_query("SELECT * FROM video_games") or die(mysql_error());
echo 'hello world'
mysql_close();
?>
它工作正常(它显示'你好世界')。有人知道这是从哪里来的吗?
非常感谢。
你忘了'host =' – develop7 2009-12-16 18:16:12
是的,谢谢你! – Julien 2009-12-16 20:48:45