MySQL Learning Practice---basic settings

Source: Internet
Author: User

This article for MU Lesson Network MySQL study notes, address: http://www.imooc.com/learn/122

First, configure the default character set to UTF8 in My.ini

A. Client: [MySQL] Default-character-set=utf8

  B. Service side: [Mysqld] Character-set-server=utf8

Two. Start Stop MySQL Service

A. In Windows environment Computer Management-Services found MySQL service, right-click Start or stop

B. Use the command, open cmd, start the service using net start MySQL, stop the service with net stop MySQL

Iii. Login and exit

A. Login parameters

  

B. Exit mode: Exit; quit; or \q;

Iv. Modify the MySQL prompt (\d--full date, \d--current database, \h--server name, \u--current user. Eg: \[email protected]\h \d)

A. When logging into the service, such as: Mysql-uroot-p--prompt prompt

B. Use the prompt prompt after logging in;

V. Common commands of MySQL

A. View current version: SELECT version ();

B. View the current date and time: SELECT now (); View current Date: SELECT curdate (); View current time: SELECT Curtime ();

C. View the currently logged on User: SELECT user ();

D. View warning message: Show WARNINGS;

E. View information when the database was created: show creation Database dbname;

VI. specification of MySQL statements

A. Keyword and function names all uppercase

B. Database name, table name, field names lowercase

C. Each SQL data must end with;

VII. Create a database (curly braces are required, brackets are optional)

  

Viii. Modifying the database character set

  

Ix. Deleting a database

  

MySQL Learning Practice---basic settings

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.