Show log of MySQL when running query in rails — hungnhot’s blog


When you run query to select, update, insert… in ruby, you can show log realtime when query is running. First, go to MySQL and run: show variables like ‘%log%’; And find record with variable_name = general_log_file and get its value. In case, value is /var/lib/mysql/OFF016.log Then, set set global general_log = 1; Then, open terminal and […]

via Show log of MySQL when running query in rails — hungnhot’s blog

Advertisements