From within your MySQL client, type
tee session.out
From that point on, all the I/O of in your current client session is written to the file ‘session.out’
From within your MySQL client, type
tee session.out
From that point on, all the I/O of in your current client session is written to the file ‘session.out’