./mysqld_safe --skip-grant-tables;
mysql -u root -p
use mysql;
update user set host='localhost' where user='root' and host='host';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION;
flush privileges
./mysqld_safe --skip-grant-tables;
mysql -u root -p
use mysql;
update user set host='localhost' where user='root' and host='host';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION;
flush privileges