//給mysql用戶username對數(shù)據(jù)庫databaseName所有表所有權限蟹倾,且username用戶可以使用遠程所以ip登錄
mysql>grant all privileges on databaseName.* to 'username'@'%' identified by ‘password′;
//給來自10.163.225.87的用戶joe分配可對所有數(shù)據(jù)庫的所有表進行所有操作的權限荤崇,并設定口令為123
mysql>grant all privileges on *.* to joe@10.163.225.87 identified by ‘123′;