i can't connect to PhpMyAdmin on my local server as shown bellow, it shows me the message "#1130 - Host 'localhost' is not allowed to connect to this MySQL server", i think the problem is with MySql, someone can help pleas ?
-
Is your WAMPServer on a different PC to where you are trying to run phpMyAdmin from? – RiggsFolly Mar 18 '15 at 09:13
-
No sir @RiggsFolly i'm on the same PC – L-HAZAM Mar 18 '15 at 10:51
-
What version of WAMPServer are you running? And what version of Apache. – RiggsFolly Mar 18 '15 at 11:05
3 Answers

- 1
- 1

- 514
- 4
- 14
-
i'm a beginner to this, can you show me all the steps to do that sir ? – L-HAZAM Mar 17 '15 at 16:17
This sounds like it might be an IPV4/IPV6 issue. Modern browser will use either, why the decide to use IPV4 or IPV6 address ranges, I dont know yet.
You can test this theory by launching phpMyAdmin like this 127.0.0.1/phpmyadmin
if that works and ::1/phpmyadmin
does not, then the problem is probably related to phpMyAdmin not being allowed to be run from the ::1
IPV6 address.
First make sure you have these entries in your HOSTS file \windows\system32\drivers\etc\hosts
127.0.0.1 localhost
::1 localhost
These entries will associate the domain name localhost with both the IPV4 (127.0.0.1) and IPV6(::1) loopback ip address's i.e. connect to this machine when you see the domain name localhost
.
If you have to change the HOSTS file you then need to reboot or run these 2 commands from a command windows that is started using "Run as Administrator" to refresh the dnscache
and pick up your changes.
net stop dnscache
net start dnscache
Next check the Alias settings for phpMyAdmin.
Edit the \wamp\alias\phpmyadmin.conf
file.
Make sure that both 127.0.0.1
and ::1
are allowed to connect to Apache
If you are using Apache 2.2.x then look for this section and make sure it contains this in the Allow from
line
Order Deny,Allow
Deny from all
Allow from localhost ::1 127.0.0.1
If you are using Apache 2.2.4 then look for this section and make sure it contains this in the Require
line. If you still have the old Apache 2.2 syntax in here, remove it and use this instead.
Require local
The Require local
covers both localhost
, 127.0.0.1
and ::1
in Apache 2.4

- 93,638
- 21
- 103
- 149
-
sorry sir, the problem is that i can't even launch Phpmyadmin the first screen i got while openening localhost/phpmyadmin or 127.0.0.1/phpmyadmin is the screen above. – L-HAZAM Mar 18 '15 at 17:13
-
In that case are you runing WAMPServer? If so what version. Also have you changed the MySQL `root` user in any way like adding a password. – RiggsFolly Mar 18 '15 at 19:10
I would help, but I can't read the text in your image and there is no code either.

- 537
- 6
- 14
-
Thanx sir, the message is "#1130 - Host 'localhost' is not allowed to connect to this MySQL server " – L-HAZAM Mar 17 '15 at 12:13
-