I installed xampp and using control panel clicked start
for mysql. And then tried to access http:\\localhost
but it says an error
localhost refused to connect.
I searched multiple web sites for solution,everyone said it's port issue, but found nothing helpful. In the end, I came with an idea to let first start Apache and then MySQL simultaneously and problem got solved.
Can anyone explain why Apache needs to be started first for localhost
to work?
Apache acts as your local Web server, when you start Apache on XAMPP, you basically start a web hosting service locally on your computer.
Even though you've enabled MySQL on XAMPP, you wouldn't be able to access your phpmyadmin portal without turning Apache on. Why? Because Apache acts as your local web server. Not only phpmyadmin, but any developmental websites under localhost cannot be accessed until apache is turned on in XAMPP, and it is pretty much common knowledge!
Hope this helped!