Reputation: 830
I've installed Zend Server CE on Windows 7 and I can't connect to MySQL.
When I try to log into phpMyAdmin I get the following error
#2002 Cannot log in to the MySQL server
When I try to connect through a test PHP script like so...
$db = mysql_connect("127.0.0.1:3306", "user", "pass"); if (!$db) { die('Could not connect: ' . mysql_error()); } echo 'Connected successfully<br><br>';
I get
Could not connect: No connection could be made because the target machine actively refused it.
When I log into Zend Server Admin, the mysql extension is turned on. But when I look at what ports are open via the cmd command 'netstat -ano'. It doesn't show anything listening on 3306.
I found a similar question here connecing to mysql with Zend Server CE that points to an answer here http://forums.zend.com/viewtopic.php?f=8&t=21873 but it doesn't work for me.
I'm don't have a my.ini file in my mysql 5.1 folder. I have the following files:
my-huge.ini
my-innodb-heavy-4G.ini
my-large.ini
my-medium.ini
my-small.ini
my-template.ini
None of them have the mentioned lined for me to comment out.
Can anyone help?
Upvotes: 1
Views: 4220
Reputation: 164
Perhaps the MySQL server is not running. Open the Services with ApacheXX-Zend
, and start the MYSQL_ZendServerXX
(Status = Started).
Upvotes: 2
Reputation: 31
Do you have a previous mysql instance installed?? Zend Server CE comes with it's own MySQL instance and it is possible that you (or your SO) have to stop the previous mysql installation in order to function properly.
Upvotes: 1
Reputation:
it means that the machine exists and host name is ok. but that it has no services listening on the given port.
Might be firewall there is blocking you.
Upvotes: 0