标签:
mysql 进入mysqldb
SELECT DISTINCT CONCAT(‘User: ‘‘‘,user,‘‘‘@‘‘‘,host,‘‘‘;‘) AS query FROM mysql.user;
查询所有用户
CREATE USER ‘oozie‘@‘%‘ IDENTIFIED BY ‘oozie‘;
创建一个用户可以访问所有数据库(%表示)密码是oozie
GRANT ALL PRIVILEGES ON *.* TO ‘oozie‘@‘%‘ IDENTIFIED BY ‘oozie‘ WITH GRANT OPTION;
赋值所有库的权限给用户oozie 密码是oozie
grant all privileges on ooize.* to ‘ooize‘@‘%‘ identified by ‘ooize‘;
赋值所有库所有权限给ooize 密码ooize
标签:
原文地址:http://www.cnblogs.com/yaohaitao/p/5804191.html