Navigation
- FAQ Home
- All categories
- About Webyog support and about this FAQ
- About the SQLyog program

- Connection issues

- Using the GUI
- Managing your MySQL Database Systems

- Database Schema Synchronization
- MySQL DATA synchronization
- SQL Scheduler and Reporting Tool
- Importing external data
- Backup/Restore
- SQLyog Job Agent (SJA)

- Working with Views, Stored Procedures and Triggers
- Character Set and Localization Issues
- MySQL bugs that affect SQLyog
- Questions on Open Source and Compiling
- Sitemap
Most popular FAQs 
- I get error 1130 "Host is not allowed to ... (169314 views)
- Error no. 2003: Can't connect... (86269 views)
- SQLyog Version History (63952 views)
- Error no. 1045: "Connection denied..." (61346 views)
- Error no. 1251: "Client does not support authentication..." (58317 views)
- Error No. 2005: Unknown MySQL server host... (50192 views)
- What is HTTP-tunneling? (42282 views)
- What Is SSH and SSH-tunneling? (38071 views)
- Can I use SQLyog with the WINE Windows emulator ... (34943 views)
- Why are Stored Procedures not created when I import ... (34267 views)
Latest FAQs 
- SQLyog Version History (2012-01-26 08:20)
- SQLyog is a client for the MySQL server - ... (2011-11-04 04:48)
- I get error 1130 "Host is not allowed to ... (2011-11-01 05:21)
- Problems on Ubuntu 11.x (2011-10-29 13:02)
- Problems creating a functional DSN on 64 bit Windows. ... (2011-09-15 14:34)
Sticky FAQs
SQL Scheduler and Reporting Tool
Can I schedule CSV export and import?
The CSV export and import functionality of the SQLyog GUI are not directly implemented in the SJA. But both are posible with relative simple SQL statements from 'SQL Scheduler and Reporting Tool'.
1) export:
You can schedule and execute a "SELECT INTO OUTFILE .." statement. That will store the outfile on the machine where MySQL is running (as SELECT INTO OUTFILE has no LOCAL option in MySQL).
From MySQL docs:
http://dev.mysql.com/doc/refman/5.0/en/select.html
"Here is an example that produces a file in the comma-separated values (CSV) format used by many programs:
SELECT a,b ... INTO OUTFILE '/tmp/result.txt'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY '\n'
FROM test_table;"
Note that the outfile must be renamed or deleted before next run. This can be done by a batch job that also calls SJA. or you may use prepared statements with 'SQL Scheduler and Reporting Tool' to generate the file name dynamically using a timestamp for instance.
One detail to observe is that with MySQL on a Windows machine "\" characters in the file path must be escaped (as normally within strings).
This is correct: SELECT a,b INTO OUTFILE 'c:\\tmp\\result.txt' ...
and this will fail: SELECT a,b INTO OUTFILE 'c:\tmp\result.txt' ...
2) import
In quite a similar way you may schedule a LOAD DATA (LOCAL) INFILE statement with 'SQL Scheduler and Reporting Tool'. Refer to:
Tags: -
Related entries:
- Do I need PHP to use SQLyog with MySQL?
- SQLyog Version History
- What kind of ODBC databases are supported by SQLyog Import External Data Tool?
- What is and what is not imported by the SQLyog Import External Data Tool?
- Can I perform "incremental import" with the SQLyog Import External Data Tool?
Last update: 2008-09-09 15:57
Author: Peter Laursen
Revision: 1.0
You can comment this FAQ