//首先创建一个数据库(we_data) ,如果已有数据库,不需要此操作
mysql>create database we_data
//授权frady用户拥有we_data数据库的所有权限,但只能在本地访问。
>grant all privileges on we_data.* to 'frady'@localhost identified by '1234';
//刷新系统权限表
mysql>flush privileges;
/*
如果想指定部分权限给一用户,可以这样来写:
mysql>grant select,update on we_data.* to 'frady'@localhost identified by '1234';
//刷新系统权限表。
mysql>flush privileges;
想让frady用户可以远程访问we_data数据库
grant all privileges on we_data.* to 'frady'@'%' identified by 'youpasswd';