MySQL

 
 
MySQL is a fast, multi-threaded, multi-user open source SQL database server.

The MySQL database is released under the GNU General Public License (GPL). MySQL can be used for free when you are not distributing any part of the MySQL system. For example: If you run a commercial web site using the MySQL Database Software as long as MySQL is not distributed.

Please read the MySQL manual for situations where a commercial license is needed.

More information about MySQL can be found at: http://www.mysql.com

MySQL online manual can be found at: http://dev.mysql.com/doc/index.html

The latest MySQL version can be downloaded from: http://dev.mysql.com/downloads/index.html

rss feed






Create and load CSV files.



Information
None

Operating system used
Windows XP Home Edition Version 5.1 SP 2

Software prerequisites
MySQL 3.23 or higher


Procedure
  1. Goto the MySQL bin directory, e.g.: C:\Tools\mysql\bin

  2. To create a csv file from one table from a database, you can use the following command:
    mysqldump -u[username] -p[password] --no-create-info --tab=[csv_directory]
    --fields-terminated-by='[line_terminator]' [database] [table]


    For example:
    mysqldump -uroot -pmysecret --no-create-info --tab=c:/cvs_temp
    --fields-terminated-by=',' mambo mos_content


    Note 1: The cvs file "mos_content.txt" is created in directory c:/cvs_temp.
    Note 2: The cvs filename is the same as the table name.



  3. To create csv files from all tables from a database, you can use the following command:
    mysqldump -u[username] -p[password] --no-create-info --tab=[csv_directory]
    --fields-terminated-by='[line_terminator]' [database]


    For example:
    mysqldump -uroot -pmysecret --no-create-info --tab=c:/cvs_temp
    --fields-terminated-by=',' mambo


    Note 1: Several cvs files such as "mos_content.txt", "mos_menu.txt" etc. are created in directory c:/cvs_temp.
    Note 2: Each created cvs file has the same name as its table name.