MySQL command line logon example: mysql command line Logon

Source: Internet
Author: User

MySQL command line logon example: mysql command line Logon

Environment: MySQL Sever 5.1 + MySQL command line tool

Problem: MySQL command line Logon

Solution:

Command Line logon Syntax:

Mysql-u user name [-h host name or IP address]-p Password

Note: The user name is the user you log on to. The host name or IP address is optional. If you are using a local connection, you do not need it. You need to enter the remote connection. The password is the password of the user.

Note:

1. This command is executed in the Windows command line window, rather than the MySQL command line;

2. Enter-p to keep up with the password, or press enter to prompt you to enter the password, both of which have the same effect;

3. The-p password option is not always at the end;

4. There is no space after-u,-h, and-p.

Example:

-- Connect to mysql locally-uroot-p -- remotely connect to mysql-uwgb-hXXX. XXX-p

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.