grant all privileges on weizany.* to www@115.57.134.46 identified by '123456' 在举几个例子:
mysql> grant all privileges on weizany.* to www@'%' identified by '123456' 给来自任何主机的用户www分配可对数据库weizany所有表进行所有操作的权限,并设定口令为123456。
mysql> grant select,insert,update,delete,create,drop on weizany.tb to www@115.57.134.46 identified by '123456';
给来自115.57.134.46的用户www分配可对数据库weizany的tb表进行select,insert,update,delete,create,drop等操作的权限,并设定口令为123456。
mysql> grant all privileges on weizany.* to www@115.57.134.46 identified by '123456' 给来自115.57.134.46的用户www分配可对数据库weizany所有表进行所有操作的权限,并设定口令为123456。 mysql> grant all privileges on *.* to www@115.57.134.46 identified by ‘123456′; 给来自115.57.134.46的用户www分配可对所有数据库的所有表进行所有操作的权限,并设定口令为123456。 mysql> grant all privileges on *.* to www@localhost identified by ‘123456′; 给本机用户www分配可对所有数据库的所有表进行所有操作的权限,并设定口令为123456。