Backup Database:(outside of the MySQL service execution )
mysqldump - H server address-u login name-P The name of the database to be backed up > the file to save as
To recover a database:
mysql-h server address-u login name-P port number-p database name < file name
Note: Typically the database name needs to be established first (present):
Basic Grammar Rules
Single-line comment: # Comment Content
Single-line comment: --note content (Note thatthere is a space after two "--")
Multiline Comment:/ * Comment content * /
statement Terminator
Default is semicolon (English)
You can also set the command to:delimiter
form:delimiter new symbol (can be multiple characters)
Then after this statement, the new set of symbols is used to end a statement.
naming rules in the database
MySQL itself is case insensitive.
However, in some case-sensitive operating systems, the database name and table name are case sensitive.
It is recommended to use "underline naming" to name various identifiers: the words are in lowercase letters, and the words are separated by "_".
Backing Up the database