![]() If you just want to log the output from one query to a text file with MySQL, that's all you have to do. That file contains the output from my query This query creates a new plain text file in the /tmp directory on my Linux system named watchdog.out. Mysql> select * from watchdog into outfile '/tmp/watchdog.out' To save the output from a SQL SELECT query to a text file with MySQL, all you have to do is use the " INTO OUTFILE" syntax from the MySQL client, like this: How to save the output of one MySQL query to a text file In this tutorial I'll show you both (a) how to save the results of a MySQL query to a text file, and also (b) how to log your entire MySQL session to a text file. This table had thousands of records in it, and I couldn't find what I needed with SQL SELECT queries, so I finally dug through the MySQL documentation, and found that I could save the output from a SELECT query to a text file. ![]() I had a problem with this website last Wednesday, and as part of troubleshooting the problem I needed to look at one of the Drupal database tables, specifically the watchdog table.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |