MySQL Learning--mysql Login command

Source: Internet
Author: User
Tags mysql login

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

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.