我在Windows 7上安裝了Zend Server CE,但無法連接到MySQL。Zend Server無法連接到mysql
當我嘗試登錄到phpMyAdmin的我收到以下錯誤
#2002 Cannot log in to the MySQL server
當我試圖通過像這樣一個測試PHP腳本連接...
$db = mysql_connect("127.0.0.1:3306", "user", "pass"); if (!$db) { die('Could not connect: ' . mysql_error()); } echo 'Connected successfully<br><br>';
我得到
Could not connect: No connection could be made because the target machine actively refused it.
當我登錄到Zend服務器管理,mysql擴展被打開。但是當我通過cmd命令'netstat -ano'查看哪些端口是打開的。它不顯示任何監聽3306
我發現了一個類似的問題在這裏connecing to mysql with Zend Server CE指向一個答案在這裏http://forums.zend.com/viewtopic.php?f=8&t=21873,但它不爲我工作。
我沒有在我的MySQL 5.1文件夾中的my.ini文件。我有以下文件:
我-huge.ini
我-InnoDB的-重4G.ini
我-large.ini
我-medium.ini中
my-small.ini
my-template.ini
他們都沒有menti我立刻發表評論。
任何人都可以幫忙嗎?
它運行在我的個人電腦上。我不認爲這是一個防火牆問題。 – liz 2012-03-26 22:37:06
我不得不卸載Zend Server,然後重新安裝它。我認爲在這個過程中出現了問題。 – liz 2012-03-27 00:37:31