grant select,insert,update,delete,create,drop on hanzheng.hr to hz@192.168.31.87 identified by ‘HanZheng.456‘;
说明:给主机为192.168.31.87的用户hr分配可对数据库hanzheng的hr表进行select,insert,update,delete,create,drop等操作的权限,并设定口令为HanZheng.456
mysql>grant all privileges on hanzheng.* to hr@192.168.31.87 identified by ‘HanZheng.456‘;
说明:给主机为192.168.31.87的用户hr分配可对数据库hanzheng所有表进行所有操作的权限,并设定口令为HanZheng.456
mysql>grant all privileges on *.* to hr@192.168.31.87 identified by ‘HanZheng.456‘;
说明:给主机为192.168.31.87的用户hr分配可对所有数据库的所有表进行所有操作的权限,并设定口令为HanZheng.456
mysql>grant all privileges on *.* to hr@localhost identified by ‘HanZheng.456‘;
说明:用户hr分配可对所有数据库的所有表进行所有操作的权限,并设定口令为HanZheng.456
本文出自 “为梦想奋斗” 博客,谢绝转载!
原文:http://hanzheng.blog.51cto.com/3080616/1751326