Output MySQL source results to log file

前端 未结 3 1263
-上瘾入骨i
-上瘾入骨i 2021-02-01 04:50

I am trying to execute foo.sql using the source command in MySQL.

When I type the command, the file is sourced accordingly:

mysql> source ~/foo.sql
         


        
3条回答
  •  甜味超标
    2021-02-01 05:20

    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'

提交回复
热议问题