Use the cmd command to connect to mysql_MySQL

Source: Internet
Author: User
Use the cmd command to connect to mysql bitsCN.com

To connect to mysql through the command window in cmd, you only need to input mysql-uroot-p123456 in the command line. the prompt "mysql is not an internal or external command" appears ". The solution is to add C:/Program Files/MySQL Server 5.6/bin in the path of the environment variable.

For example:

After configuring mysql to environment variables, enter "mysql-uroot-p123456" in the command window of cmd. For example:

Now you can use the cmd command to connect to the mysql database. Note that-u is followed by the username used to connect to the database, with no space. -P is followed by a connection password without spaces.

Command: mysql-uroot-p123456

If you add a semicolon to the end of the command, the following message appears:

C:/Users/Administrator> mysql-uroot-p123456;
Warning: Using a password on the command line interface can be insecure.
ERROR 1045 (28000): Access denied for user 'root' @ 'localhost' (using password: Y
ES)

The solution is not to add extra points.

BitsCN.com

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.