mysql 新建用户

分类:技术文档 - MySQL | 阅读(2019) | 发布于:2015-01-14 16:53

新建用户 UserName 密码 PassWord
给予用户 DBname库的所有权限
给予用户 所有IP的访问权限


CREATE user UserName IDENTIFIED BY 'PassWord';
UPDATE mysql.user SET PASSWORD = password( 'PassWord' ) WHERE user = 'UserName';
GRANT ALL PRIVILEGES ON DBname . * TO UserName@ '%';
FLUSH PRIVILEGES ;

标签:mysql新建用户