L-HAZAM
L-HAZAM

Reputation: 84

error message while connecting to phpmyadmin

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 ?

enter image description here

Upvotes: 0

Views: 490

Answers (3)

RiggsFolly
RiggsFolly

Reputation: 94642

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

Upvotes: 1

davbuc
davbuc

Reputation: 537

I would help, but I can't read the text in your image and there is no code either.

Upvotes: 0

Related Questions