Thanks to this article, I was linked to this article, which, after giving my PC two IPAddresses, was able to have IIS and Apache living happily on the same PC at the same time.

I also added the following lines in my hosts file so that IIS could run normal w/o interfering with my playtime: localapache localhost #Required since I added two ip addresses

I want my Apache/PHP/MySql to go to .99 and IIS to use .2.

Now, I'm down to configuring MySql. According to XAMPP's control panel, it starts/stops when requested (e.g. enter image description here) . However, when I try to run mysql.exe, I get the following error message:

ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)

The only changes to mysql that I've made is adding the following line to my.ini:

bind-address="" #.99 is my Apache address

Is there some other mysql configuration change I need to make so that mysql looks to and not localhost?

migrated from stackoverflow.com Oct 21 '11 at 4:34

This question came from our site for professional and enthusiast programmers.


Got it.

MySQL would only let me connect to it if I removed the entry in my hosts file listed above. I also removed the bind-address configuration in my my.ini so that it would bind to to Basically, I put my box back in the state it would be in by default for connecting to MySql.

From there I ran the following commands:

mysql -u root -p

I understand having no password for root is not recommended.

I also understand the command above allows anyone in the world to connect to mySql. That's fine. It's a dev machine sitting behind a firewall; no worries there.

So apparently I should have started with the MySQL install first and granted the privileges I wanted before I made IP changes.

I'm sure there's a smarter way, but I now have IIS, SQL Server, Apache and mySql living in harmony on my machine; which is exactly what I wanted.

No need for virtual machines.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.