时间:2021-07-01 10:21:17 帮助过:5人阅读
mysql开启命令行日志(可以记录source等的日志)
mysql> tee hello.log
mysql>select now() ;
mysql>exit; //退出mysql 客户端
查看 hello.log 文件内容如下:
mysql> select now();
用法如下:
Step 1: Login to MySQL
Step 2: In the MySQL command prompt, type the below command.
mysql> tee log.out
Logging to file ‘log.out‘
mysql>
You should see a message “Logging to file” displayed on the screen.
Step 3: Now, source the SQL file
mysql> source sample.sql
Step 4: The output of source command would have been logged into a file log.out.
Step 5: View the log.out
$ more log.out
————————————————
版权声明:本文为CSDN博主「细雨9523」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/weixin_29914581/article/details/113596271
mysql source输出记录日志
标签:版权 into mysq tail 链接 select put type now()