1.创建数据库指定字符集:
CREATE DATABASE db_name DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci
2.新建用户:
create user 'hive'@'localhost' identified by '123456';
如果提示:ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables错误
输入:flush privileges; //直译:更新权限 即可解决
3.查询mysql现有用户
select host,user,authentication_string from mysql.user;
4.给新用户授权
grant all privileges on `hive`.* to 'hive'@'localhost';
5.更新权限
grant all privileges on `hive`.* to 'hive'@'localhost';
flush privileges;
6.查看用户权限
show grants for 'xxx'@'localhost';
7.linux备份+windos还原
持续更新...