MySQL database BASICS (1) (starting/stopping, logging/exiting, syntax specifications, and most basic operations) (continuously updating), mysql updating

Source: Internet
Author: User

MySQL database BASICS (1) (starting/stopping, logging/exiting, syntax specifications, and most basic operations) (continuously updating), mysql updating

1. start/stop the MySQL Service

Start: net start mysql stop: net stop mysql

2. MySQL logon/exit

Logon: mysql parameter. If you are connected to a local server, run the command: mysql-uroot-p ******* (****** indicates the password)

Exit: mysql> exit; or mysql> quit; or mysql> \ q;

3. Modify the MySQL prompt

Prompt: \ D: complete date \ d: Current Database \ h: Server Name \ u: current user

4. MySQL Common commands and syntax specifications

4.1: displays the current Mysql VERSION: select version (); 4.2, displays the current date and time: select now (); 4.2, displays the current USER: select user ();

MySQL statement specification: All keywords and function names are in upper case (the keyword and function are in lower case. The system can also confirm which keywords and functions are separated from each other in a statement, which are database names, table names, and field names? in upper case !); The database name, table name, and field name must all be in lowercase. The SQL statement must end with a semicolon.

5. operate databases

 

Related Article

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.