标签:lte mysql password db_name 添加 ons name option ges
---------------------------------------------------------------------------------------------------------- --添加用户 create user user [identified by [password] ‘password‘] [, user [identified by [password] ‘password‘]] ... user: ‘user_name‘@ ‘host name‘ --删除用户 drop user user [, user_name] ... --修改用户名 rename user old_user to new_user, [, old_user to new_user] ... --修改密码 SET PASSWORD [FOR user]= PASSWORD(‘newpassword‘) ------------------------------------------------------------------------------------------------------------- --grant语法格式 grant priv_type [(column_list)] [, priv_type [(column_list)]] ... on [object_type] {tbl_name | * | *.* | db_name.*} to user [identified by [password] ‘password‘] [, user [identified by [password] ‘password‘]] ... [with with_option [with_option] ...] priv_type: insert,select、update、delete、references、create、alter、index、drop、all或all privileges(表) SELECT、INSERT、DELETE、UPDATE、REFERENCES、CREATE、ALTER、INDEX、DROP、CREATE TEMPORARY TABLES、CREATE VIEW、SHOW VIEW、 CREATE ROUTINE、ALTER ROUTINE、EXECUTE ROUTINE、LOCK TABLES、ALL或ALL PRIVILEGES object_type: table | function | procedure with_option :--表示TO子句中指定的所有用户都有把自己所拥有的权限授予其他用户的权利,而不管其他用户是否拥有该权限。 grant option | max_queries_per_hour count | max_updates_per_hour count | max_connections_per_hour count | max_user_connections count --回收权限 revoke priv_type [(column_list)] [, priv_type [(column_list)]] ... on {tbl_name | * | *.* | db_name.*} from user [, user] ... --或者: revoke all privileges, grant option from user [, user] ... -----------------------------------------------------------------------------------
标签:lte mysql password db_name 添加 ons name option ges
原文地址:http://www.cnblogs.com/wangyonglong/p/7196030.html