MySQL Export CSV

Source: Internet
Author: User
Tags bit set

Original page http://www.web-jia.com/view.php?a=12

Today there are some requirements for some data, now this system uses MySQL database, no SQL Server export data is so simple

The simplest thing to think about data is, of course, to export the CSV.

Check the outfile can be a little bit set up on it or very good

SELECT * from player to outfile ' d:/out.csv ' fields terminated by ', ' optionally enclosed by ' ' lines terminated by ' \ n ' ;

Such a leader is wrong to say can not write because there is no directory it is normal then I changed the ' d:/out.csv ' to ' out.csv '

Export success I can't find a file.

Just reported/var/lib/mysql/d:/out.csv can't write I went to/var/lib/mysql/directory but no

On-line search did not specifically say what, then suddenly thought I used the use of the game will not be in the data game directory under a something else really right, everything ready to go to the official server to pour data

I can't write the root of the execution. It's not clear what the difference is.

Find another way to export online

Mysql-uroot-p111-n-E "select * from Player" GAME|SED-E "s/^/\"/"-E" s/[\t]/\ ", \"/g "-e" s/$/\ "\r/" >out.csv

The export was successful, but the Chinese garbled, the file modulation code also not

You can only add set names UTF8 in front of the SQL statement;

Re-export succeeded.

node. JS Source Code Research Module Organization load
Improve JavaScript asynchronous programming experience with Jscex
1.5 The basic idea of CSS layout (2)
Explore the HTML 5 link prefetching feature for website acceleration
Nine amazing HTML 5 and JavaScript experiments
Quick knowledge of PHP array loop fetching data tips
HTML 5 technical field of mature game application is scarce
2.11 Class and ID attributes
5.6 Stuff and nonsense: Creating a Better switcher (1)
Granular management and loading of your JavaScript modules with In.js
HTML 5: Deserved or exaggerated?

MySQL Export CSV

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.