Troubleshooting of MySQL command line logon errors

Source: Internet
Author: User
Tags mysql command line

An error occurred while logging on to the MySQL command line? It doesn't matter. Here we will teach you a solution to the MySQL command line logon error, hoping to help you solve this problem.

When MySQL was just installed, MySQL command line login methods were MySQL-u root-p password

For example, mysql-r root-p 123456

But the strange thing is that this command is wrong if I enter it or not, and it will require another password and then return

"ERROR 1049 (42000): Unknown database '000000 '"

The error message is obvious. The password after-P represents the database name. However, for the-p parameter, p should represent the password. Previously, I was puzzled. After logging on to MySQL, I always use

C: \> mysql-u root-p

Enter password :******

This format.

Today, I suddenly found a post:

Mysql-r root-p123456

-P is connected to the password. Please try again. You can log in!

It has been misled for so long. How did I find out some formats with spaces behind-p.

PS:-r can be followed by the user name or space, but the password cannot be followed by space.

Format:

Mysql-r root-p123456

Mysql-rroot-p123456
 

Several ways to copy a table in mysql

How to query the maximum value of a MYSQL table Field

MySQL table management commands

Mysql table index information

Two Methods for restoring mysql tables

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.