Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Import/Export MySQL

Status
Not open for further replies.

akalinowski

IS-IT--Management
Oct 3, 2006
190
US
i'm kinda a newbie to MySQL (i've only dealt with MS SQL 2k and up)
is there a utility like DTS / SSIS that i can use to schedule import/export of data to an odbc connection or a csv file or will it all need to be done int some script(Ruby,PHP etc)

problem is i know T-SQL and ANSI SQL and ColdFusion and that is the extent of my coding knowledge.

akalinowski
 
You can schedule backups by using the mysqldump command line utility. It should be in the bin folder of the mysql installation.

You can setup a batch file that will dump your tables and data to a file in the format you require. It can eve dump the creation routines of your table, so you get a complete backup which you can feed to MYSQL and have your database and tables back up in very little time.
----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Behind the Web, Tips and Tricks for Web Development.
 
What do you want to achieve? If you want a backup, use the mysqldump utility as suggested above.

If you want to access the data from a script, you can connect to the database from the script. If you cannot (say, because the script runs on a disconnected laptop computer) or really want a CSV file, you can also use the command-line client, but you have to do some more work, as the -B option only produces tab-delimited output. You can the use (for instance) sed to convert it into CSV.

+++ Despite being wrong in every important aspect, that is a very good analogy +++
Hex (in Darwin's Watch)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top