MySQL 登陆权限设置SQL语句

MySQL 登陆权限设置SQL语句 1. 建立hive用户 create user 'hive'@'master' identified by 'hive'; 2. 对hive用户赋予权限 grant all privileges on *.* to 'hive'@'master' identified by 'hive' with grant option;   浏览权限记录 mysql> show grants for hive@'master'; +-------------------------------------------------------------------------------------------------------------------------------------+ | Grants for hive@master                                                                                                              | +-------------------------------------------------------------------------------------------------------------------------------------+ | GRANT ALL PRIVILEGES ON *.* TO 'hive'@'master' IDENTIFIED BY PASSWORD '*4DF1D66463C18D44E3B001A8FB1BBFBEA13E27FC' WITH GRANT OPTION | +-------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.00 sec) 3. 刷新权限 flush privileges; 4. 登陆测试 mysql -h master -uhive -phive
相关文章
相关标签/搜索