UPDATE USER SET PASSWORD = PASSWORD('123') WHERE HOST = 'localhost' AND USER = 'root' SELECT USER, HOST FROM mysql.user; GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123'; FLUSH PRIVILEGES;