#允许本地访问的用户(127.0.0.1
mysql> create user see_yong@localhost identified by 'see_yong1';

# 允许外网IP访问的用户
mysql> create user 'see_yong'@'%' identified by 'see_yong1';

# 授予用户在本地服务器对该数据库的全部权限
mysql> grant all privileges on dbname.* to see_yong@localhost identified by 'see_yong1';

#授予用户通过外网IP对于该数据库的全部权限
mysql> grant all privileges on dbname.* to 'see_yong'@'%' identified by 'see_yong1';

#刷新权限
mysql> flush privileges;

#授予用户通过外网IP访问所有数据库的的全部权限
mysql> GRANT ALL PRIVILEGES ON *.* TO 'see_yong'@'%' IDENTIFIED BY 'see_yong1';