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