mysql -uroot -p
GRANT ALL PRIVILEGES ON *.* TO root@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON *.* TO root@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;
flush privileges;
GRANT ALL PRIVILEGES ON *.* TO root@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;
flush privileges;