Remember that when you installed MySQL database, you typed it from the command line
mysql -u root -p password
When I entered the command today, I found that it was incorrect, and I was asked to enter the password again, and then returned
“ERROR 1049 (42000): Unknown database '123'”
The figure shows
The error message is that you don’t know the 123 database, meaning that the password after -p represents the database name. But the argument after -p is supposed to mean password, which is weird.
So I went through the blog that I summarized earlier and found that the statement looked like this
mysql -u root -p123
can see that -p and password are linked together, there is no space between them
and then log in naturally!!
Then I looked at a wave and I found:
-U can be followed by the user name or a space, but the password must not be followed by a space.
if Spaces are added, mysql will assume that the last one is a library name.
we can look at the correct statement:
（1）mysql -u root -p123 （2）mysql -uroot -p123
- How to solve MySQL error 1049 (42000): unknown database ‘database’
- After installing MySQL again under Linux, the solution of ‘MySQL module failed to start’ appears
- Golang MySQL error SQL: unknown driver “MySQL” (Forgotten import?) solution
- An error is reported when logging into mysql. The error message is error 1049 (42000): unknown database ‘XXXXXX’
- MySQL unknown column ‘in’ field list ‘solution
- An error is reported when kettle connects Oracle database and MySQL database
- (error when importing database): MySQL 2006-mysql server has gone away
- PHP connection to MySQL database error: call to undefined function MySQL_ connect()
- Solve MySQL installation error: initializing database prompts an error when installing mysql
- django.core.exceptions . improveconfigured: error loading MySQL DB module. Django configuring MySQL database
- Error 1045 (28000) access denied for user ‘root’ @’localhost ‘appears in MySQL under Windows system
- MySQL error 1054 (42s22) unknown column ‘password’ in ‘field list’
- java.lang.ClassNotFoundException : com.mysql.jdbc . driver project cannot connect to database, exception, lack of MySQL driver
- Asset database transaction committed tweet appears when unity reports an error!
- MySQL ERROR 1054 (42S22): Unknown column’password’ in’field list’ error
- How to view the version of MySQL database
- Unknown error (SQLite code 14): could not open database (How to Fix)
- MySQL local connection Error 1130_ The solution of MySQL 1130 error report when remote connection through Navicat for MySQL
- ERROR 2005 (HY000): Unknown MySQL server host
- Fabric appears when trying to use application call: Unknown: access denied: Channel [mychannel] creator org [org1msp]