I issued a command of:
DROP USER 'root'@'localhost'; GRANT ALL PRIVILEGES ON . TO 'root'@'%';
...in PhpMyAdmin. Immediately after the execution, I was forced out PhpMyAdmin. I got:
error
#1130 - Host 'localhost' is not allowed to connect to this MySQL server,
how to resolve my problem?
Find the file "config.inc.php" under your phpMyAdmin directory and edit the following lines:
$cfg['Servers'][$i]['auth_type'] = 'config'; // config, http, cookie
$cfg['Servers'][$i]['user'] = 'root'; // MySQL user
$cfg['Servers'][$i]['password'] = 'TYPE_YOUR_PASSWORD_HERE'; // MySQL password
Note that the password used in the 'password' field must be the same for the MySQL root password. Also, you should check if root login is allowed in this line:
This way you have your root password set.
Use this in your
my.ini
underUse the IP instead:
For more possibilities, see this link.
To create the root user, seeing as MySQL is local & all, execute the following from the command line (Start > Run > "cmd" without quotes):
Documentation, and Lost root access in MySQL.