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?
This question is related to
mysql
database
phpmyadmin
privileges
mysql-error-1130
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:
$cfg['Servers'][$i]['AllowRoot'] = TRUE; // true = allow root login
This way you have your root password set.
Use this in your my.ini
under
[mysqldump]
user=root
password=anything
Source: Stackoverflow.com