1.Create Database
CREATE (DATABASE|SCHEMA) [IF NOT EXISTS] database_name
[COMMENT database_comment]-- Database Description
[Location Hdfs_path]-- database SourceData storage Path
[With Dbproperties (Property_name=property_value,...)] -- Other database Settings
2.Drop Database
DROP (database| SCHEMA) [IF EXISTS] database_name [restrict| CASCADE];
RESTRICT Default Usage
CASCADE Deleting a database with tables
3.Alter Database
ALTER (DATABASE|SCHEMA) database_name SET DBPROPERTIES (property_name=property_value, ...)
ALTER (DATABASE|SCHEMA) database_name SET OWNER [USER|ROLE] user_or_role;
ALTER (DATABASE|SCHEMA) database_name SET LOCATION hdfs_path;
4. Character Set encodingUsing MySQL as Hive's metadatabase, when the field is garbled in Chinese, can not forcibly change the entire encoding set of MySQL to UTF8, must be latin1 and can only be changed to the Chinese field of the character set encoding to UTF8 modify the field annotation character set alter Table COLUMNS Modify column COMMENT varchar (character set UTF8; Modify table comment Character set ALTER TABLE tabl_params Modify column Param_value varchar (4000) character set UTF8; There is also a JDBC connection to hive that modifies the character set to UTF8 Jdbc:mysql://192.168.0.128:3306/hive?characterencoding=utf-8
[Hive]-database