Support Questions
Find answers, ask questions, and share your expertise

Managing Hive Query Log Files


I want to see want to see Hive CLI log all SQL queries that are issued to MySQL.



You can check all query logs of Hive session from log file under /tmp as,


Please check.

  • /tmp/${} in Hive 0.2.0 through 0.8.0
  • /tmp/hive-${} in Hive 0.8.1 through 0.14.0
  • /tmp/hive in Hive 0.14.0 and later


Nope.. I can't see anything @nshelke

Super Guru


@Timothy Spann cannot find the patterns in mysql log

Master Collaborator

Hive uses the MySQL jdbc connector for issuing queries to MySQL. You can turn on logging through the jdbc connection url (append &profileSQL=true&logger=com.mysql.jdbc.log.StandardLogger) you are using to connect to mysql db in hive-site.xml.

To turn it on the MySQL server you need to set the following in the my.cnf.

general_log      = 1
general_log_file = /path/to/query.log

See more information here.