#允许本地访问的用户(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';
1500字范文,内容丰富有趣,写作好帮手!