//给mysql用户username对数据库databaseName所有表所有权限,且username用户可以使用远程所以ip登录
mysql>grant all privileges on databaseName.* to 'username'@'%' identified by ‘password′;
//给来自10.163.225.87的用户joe分配可对所有数据库的所有表进行所有操作的权限,并设定口令为123
mysql>grant all privileges on *.* to joe@10.163.225.87 identified by ‘123′;