grant all privileges on *.* to 'root'@'%' identified by 'root' with grant option;
The first root indicates the user name, % indicates that all computers can be connected, or a certain ip address can be set to run the connection, and the second root indicates the password.
flush privileges;
The order takes effect immediately.