Use the cmd command to connect to mysql

Source: Internet
Author: User
To connect to mysql through the command window in cmd, just enter the mysql-uroot-p123456 in the command line. It prompts that mysql is not an internal or external command. The solution is to add C: ProgramFilesMySQLMySQLServer5.6bin to the path of the environment variable. For example, After configuring mysql to an environment variable

To connect to mysql through the command window in cmd, you only need to input mysql-uroot-p123456 in the command line. It will prompt that mysql is not an internal or external command. The solution is to add C: Program FilesMySQLMySQL Server 5.6bin to the path of the environment variable. For example, After configuring mysql to an environment variable

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 FilesMySQLMySQL Server 5.6bin to 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, and there is no space.

Command: mysql-uroot-p123456

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

C: UsersAdministrator> 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.

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.