GRANT ALL PRIVILEGES ON *.* TO YourUserName@YourPublicIP IDENTIFIED BY "YourPassword";
YourUserName is the username that you would like to create.
YourPublicIP is the public IP address of your PC (can be IP range or use % to allow any host).
("211.72.20.%" = 211.72.20.0/24, quote IP range if with %)
YourPassword - You can setup a password for your account.
Don't forget flush privileges;
e.g.
mysql> grant all privileges on *.* to pank@"211.72.20.%" identified by "1111";
Query OK, 0 rows affected (0.01 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)
Leave a comment