我在 Windows 7 上安装了 Zend Server CE,但无法连接到 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 Server Admin 时,mysql 扩展已打开。但是当我查看通过 cmd 命令“netstat -ano”打开了哪些端口时。它没有显示在 3306 上监听的任何内容。
我在这里发现了一个类似的问题,它连接到带有 Zend Server CE 的 mysql,它指向了这里的答案http://forums.zend.com/viewtopic.php?f=8&t=21873但它对我不起作用。
我的 mysql 5.1 文件夹中没有 my.ini 文件。我有以下文件:
我的巨大.ini
我的innodb-heavy-4G.ini
我的大.ini
我的媒体.ini
我的小.ini
我的模板.ini
他们都没有提到我要评论的内容。
任何人都可以帮忙吗?