MySQL-based MySQL client

Source: Internet
Author: User

We first install Mysql-client as the client on the MySQL client:

$ sudo aptitude install mysql-client-5.6

Assuming all the preparations are in place, now you need a MySQL username and password. Below we log in to MySQL from the client's shell prompt, as follows:

Mysql-h Host-u User-p

If you are logged on locally to MySQL (that is, logging in from the server itself), or telnet to MySQL using the Secure Network connection tool (Ssh,secure Shell), you can omit the host parameter-H. Because the default host is localhost,localhost referencing your current system. In other environments, the command you enter must go through the network to reach the server, replacing the host parameter with a hostname that resolves to an IP address, or replaces host with the actual IP address of the MySQL server. In addition, the user parameter is replaced with the MySQL username. The-p option allows MySQL to prompt you for a password. You can also add a password directly after the-p option (for example, enter-prover,rover is the password); If you use this method, you should not leave a space between-p and the password name, however, it is not a safe way to enter a password on the command line, because the password is displayed on the screen, And the password is transmitted in clear text on the network, in addition, whenever another user gets a list of running processes on the server, the password can be seen.

After the MySQL server is used, enter quit or exit and click Enter to exit MySQL.


MySQL-based MySQL client

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.