Showing posts with label WAMP. Show all posts
Showing posts with label WAMP. Show all posts

Monday, April 27, 2015

Connection Failed: 'host' is not allowed to connect to this mysql server

Hello,

If you are getting following error while trying to connect your (PHP) application to a MySQL database

Connection Failed: 'host' is not allowed to connect to this MySQL server

Then this may due to limited privileges given to the user through which one s trying to connect with the server. Although a correct username and password is been used to connect still we have this error.

What happens is when a new MySQL user is added to a DB then the hostname name like localhost is added by default to user like user1@localhost. Now this user can access the DB for sure but while he is on the same machine not remotely.

The solution for this issue is to create a new user which has Any Host privileges "%" like

mysql> CREATE USER 'user2'@'%' IDENTIFIED BY 'password';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'user2'@'%' -> WITH GRANT OPTION;


Thanx
Anshumaan Bakshi

Wednesday, December 25, 2013

WAMP PID 4 Port 8 busy

Hello,

If you are on Windows 7 and WAMP is not working.You have closed SKYPE, changed its default ports etc, and any other related software which can possibly use port 80, and still WAMP doesn't start. Specifically Apache.

A little bit of Goggling can tell you that Port 80 is taken by Windows 7, Pid 4 in Task Manager, further you can find out that its a system process and it cannot be killed.

I found that there is service named http.sys which captures  port 80 on start-up and it needed to be stopped in order to release port 80.

It has to be disabled through REGEDIT, following are the steps for the same,

  1. Launch regedit, run-> type regedit
  2. Go to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HTTP
  3. Locate Start
  4. Change the value to 4 which means disabled.
  5. Restart your system.
  6. Now your WAMP should work.

Thanx

Anshumaan Bakshi



Wednesday, November 20, 2013

WAMP phpMyAdmin error #2002 - No connection could be made because the target machine actively refused it.

Hello,

If you get an error #2002 - No connection could be made because the target machine actively refused it when you try to access phpmyAdmin on a WAMP.

Then it is due to your 3306 port is already occupied by some other application. For me it was Skype today, I just needed to close Skype and restart the WAMP server once again and the issue was fixed. Skype will anyways take another vacant port so restart it as well.

You can make changes to my.ini so that it listens to another port, but easier to close Skype.

Try it.

Thanx
Anshumaan Bakshi