Mysql client command line usage _ MySQL

Source: Internet
Author: User
The upper and lower keys of the mysql client command line can be used to repeat the preceding command line.
Show databases; display the database (do not forget the semicolon)
Create database test; create a test database (the default charset is utf8)
Create database test charset-gbk; create test database charset is gbk
Drop database test; delete the test database
Use test; select use test database
Show tables; displays the tables in the selected database
Charset GBK or utf8
You can directly write SQL statements to create tables.
Show create table users; you can view the users table structure and database engine (I am InnoDB) and character set charset = utf8;
Load data local infile 'd: // data // country.txt 'into table country (table name) fields terminated by '/t'; insert data in the txt file to the table

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.