1. Description
This section contains a reference to MySQL reference manual Chapter III: Chapter 3 Tutorial.
2. Version
Download Install: Https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.22-winx64.zip
The latest version is: 8.0.11, because I have been using the 5.7 version, so about MySQL related content, or in the 5.7 version.
3. Chapter Content
I this document is based on the MySQL 5.7.21, so there is no change, estimates and 5.7.22 difference is not too big, only the minor version number changes.
4. Command line
Several formats for the command line:
- Mysql-u username -H hostname -P db_name: If you want to pass the password to the command line, the password immediately follows the-p parameter and cannot have spaces in the middle.
- Mysql-u username -H hostname -P db_name -E "source sqlscript.sql"-t-v > OUTP Ut.txt:sqlscript.txt is a script file that contains SQL commands,-T: The contents of the output to the Output.txt file are formatted, and-V is the output content, which contains the execution command information
- MySQL--DEFAULT-FILES=MY.CNF specifies information such as Database,username,password in a specific file, thus hiding sensitive information.
Format Description:
Shell> This means that in the shell environment of the operating system, the MySQL interface has not yet entered
Mysql> This means that MySQL is ready to wait for the input of the SQL statement
---This indicates that the SQL statement has not entered the end of the previous line
' > This expression, which continues on a line, and waits for the end of the single quotation mark
"> This expression, which continues on a line, and waits for the end of the double quotation mark
' > This representation, continue on a line, and wait for the end of the anti-quote
/*> This representation, continue on a line, and wait for the closing comment of the */character
5. Create a database, table
[Timlinux] MySQL Getting Started Guide