1: Install configuration MySQL yum install MySQL mysql-server Service mysqld Startmysqladmin-u root password
newpassword mysql-u root-plog in to MySQLmysql>grant All privileges on * * to ' root ' @ '% ' with GRANT OPTIONMyslq>flush Privileges2: Configure Hive-site.xmlDownload a hive installation package, compress and copy the Conf directory under Hive-default.xml.template to spark_home/conf, and rename it to Hive-site.xmlModify 4 Important attributes:1:javax.jdo.option.connectionurljdbc:mysql://192.168.1.93:3306/sparkmetadata? createdatabaseifnotexist=true&characterencoding= UTF-82:javax.jdo.option.connectiondrivernameCom.mysql.jdbc.Driver3:javax.jdo.option.connectionusernameRoot4:javax.jdo.option.connectionpasswordXXXthen modify all the time attributes in the Hive-site.xml, the units of all the attributes are S (s), delete s and then add 3 0, all the properties of the unit for MS Delete Ms,spark cannot recognize these units, but instead they are all treated as numbers. 3: Start Spark-sqlCreate a table under Spark-sql's shell to see the table inMySQL database:sparkmetadata : TBLs contains the record, if any, OK.
From for notes (Wiz)
Save spark SQL metadata to MySQL