I am using openserver for local server.On console if I try to enter mysql mysql
,mysql -u root
, mysql.exe -uroot
I am getting this error: ERROR 1130 (HY000): Host 'localhost' is not allowed to connect to this MySQL server.
Also I can not be entering to phpmyadmin, I think I unexpectedly deleted my root user.
I tried by adding
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'root';
$cfg['Servers'][$i]['controlhost'] = '127.0.0.1';
$cfg['Servers'][$i]['controlport'] = 3306;
$cfg['Servers'][$i]['controluser'] = 'root';
$cfg['Servers'][$i]['controlpass'] = 'root';
to my config.inc.php. But did not work. When I exit from local server "Openserver", config file being refreshed and added codes being lost.
Please help me!