Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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:

192.168.1.99 localapache

192.168.1.2 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="192.168.1.99" #.99 is my Apache address

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

share|improve this question
add comment

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

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

1 Answer

up vote 0 down vote accepted

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 127.0.0.1. 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
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '' WITH GRANT OPTION;

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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