我正在嘗試在客戶端服務器上進行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