1. For Windows systems, the command to log in to the MySQL database via the cmd command line is:
Mysql-p (password)-U (username)-H (service IP)
Login prompt:
[Warning] Using a password on the command line interface can is insecure.
[WARNING] It is not safe to use a clear password directly on the command line
It is recommended to use the command mysql-p-U (username)-H (service IP), first not directly enter the password, prompt Enter password, and then enter the password, you can borrow incredibly above problems.
After successfully logging in to MySQL, you are prompted as follows:
< Span style= "font-size:15px;" >welcome to the MySQL Monitor. commands end with; or \g. [hint: mysql command with; or \g as Terminator]
Your MySQL Connection ID is 22
Server Version:5.7.11-log MySQL Community Server (GPL)
Copyright (c), Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of the Oracle Corporation and/or its affiliates. Other names trademarks of their respective owners.
Type ' help ', ' or ' \h ' for help. Type ' \c ' to clear the current input statement.
[Tip: Type Help or \h for assistance, clear or \c to erase the command you currently type]
2. Type help output assistance information as follows:
Note that all text commands must is first on line and end with '; '
? (\?) Synonym for ' help '.
Clear (\c) Clear the current input statement.
connect (\ r) reconnect to the server. Optional arguments is DB and host.
delimiter (\d) Set statement delimiter.
Ego (\g) Send command to MySQL server, display result vertically.
exit (\q) exit MySQL. Same as quit.
Go (\g) Send command to MySQL server.
Help (\h) Display.
notee (\ t) Don ' t write into outfile.
print (\p) print current command.
prompt (\ r) Change your MySQL prompt.
quit (\q) quit MySQL.
Rehash (\#) Rebuild completion hash.
source (\.) Execute an SQL script file. Takes a file name as an argument.
status (\s) Get status information from the server.
tee (\ t) Set outfile [To_outfile]. Append everything into given outfile.
Use (\u) use another database. Takes database name as argument.
CharSet (\c) Switch to another charset. Might is needed for processing Binlog
With multi-byte charsets.
warnings (\w) Show warnings after every statement.
nowarning (\w) Don ' t show warnings after every statement.
MySQL Learning--mysql Login command