mysql Command encyclopedia-Basic operations

Source: Internet
Author: User

First, connect the database 1. Start and close the MySQL server

Start server: net start MySQL

Shut down the server: net stop MySQL

2. Client login and log out MySQL login mysql

Mysql-h IP address-u user name-p password

-H IP address does not write default native localhost

-u username, you can use Super Administrator root, or you can specify the user name

-p password, you can also lose-p Enter, enter the password input line

=

Quit MySQL

Quit or exit

Second, set the black window to get character encoding

Can see in the CMD window its character encoding is GBK, if MySQL set the database encoding format is not GBK, when input Chinese data will be error, when the Chinese data will be garbled

   For example, insert data in a table:

    

    Get Data with Chinese

    

    

To resolve this issue simply execute the command set names GBK after entering the MySQL server

    

III. Classification of SQL statements

    DDL: A data definition language used to define database objects: libraries, tables, columns, etc.;

   DML: A data manipulation language used to define records for a database;

    DCL: Data Control language used to define access rights and security levels;

    DQL: A data query language used to query records.

SQL statement Collective content see the next article: MySQL command Daquan--ddl, DML, DCL

mysql Command encyclopedia-Basic operations

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.