Re: #1130 - Host 'localhost' is not allowed to connect to this MySQL server

Status
Not open for further replies.
12 comments
Check in phpmyadmin 'Privileges' for root user

It should show localhost access

no9K7w.jpg



The fix would depend on what panel your using if any.
 
From the little info that you have given here are my suggestions --

#I am guessing that you are trying this on your local machine , if so , the username should be 'root' and no password is required

#If you are trying this on a live server , in that case you need to provide a password to connect to the DB ... (ofc the user 'gfxhotra' needs to be added with proper privileges to the DB you are trying to connect with)
 
I know this is an old thread anyway it could be related to a PHP 5.3 mysqlnd/php sockets bug present in earlier php versions related with IPv6 issues. You will likely face this issues if using php less than 5.3.5 with NT 6.0 OS (Windows Vista, 7, 2008).

You could edit phpmyadmin configuration file (config.inc.php) and replace all the instances of localhost with 127.0.0.1
Code:
$cfg['Servers'][$i]['host'] = '127.0.0.1'

It could be also caused by Windows/MySQL misconfiguration regarding host resolution, if so, start cmd.exe as administrator and run:
Code:
notepad %windir%\system32\drivers\etc\hosts
To edit your hosts file and add the following line if not present already
Code:
127.0.0.1 localhost

Regards,
NewEraCracker
 
Status
Not open for further replies.
Back
Top