1CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
2
3GRANT ALL PRIVILEGES ON *.* TO 'username'@'localhost' WITH GRANT OPTION;
4
5CREATE USER 'username'@'%' IDENTIFIED BY 'password';
6
7GRANT ALL PRIVILEGES ON *.* TO 'username'@'%' WITH GRANT OPTION;
8
9FLUSH PRIVILEGES;
1 mysql -u root -p
2 -- root password
3
4 CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
5
6 GRANT ALL PRIVILEGES ON *.* TO 'username'@'localhost' WITH GRANT OPTION;
7
8 CREATE USER 'username'@'%' IDENTIFIED BY 'password';
9
10 GRANT ALL PRIVILEGES ON *.* TO 'username'@'%' WITH GRANT OPTION;
11
12 FLUSH PRIVILEGES;
13
14 EXIT;
1GRANT ALL PRIVILEGES ON *.* TO root@my_ip IDENTIFIED BY ‘root_password‘ WITH GRANT OPTION;