Today, the user name created with Grant is quot; DanielWquot;. the user name is "Daniel @ localhostquot;" and is re-created after logon.
Today, the user name created with Grant is quot; DanielWquot;. the user name is "Daniel @ localhostquot;" and is re-created after logon.
I encountered some trouble. Although it was not solved, it was a reminder.
Today, the username created with Grant is "DanielW", and the logon password is incorrect. Create a new one. The username is "Daniel @ localhost", that is, add the host name, flush privileges, and then log out and log on again, successful!
After studying it, I found that "DanielW" is used to create a user host, and "Daniel @ localhost" stores DanielW in the user and localhost stores the user host, this is why I cannot log on, because the default-h in the mysql-u root-p logon is localhost, And the username "DanielW" is created with the wildcard %, this is not recognized by mysql ~ How to log on to this % has not been studied understand, personal opinion, hope to advise ~
========================================================== =
Read the mysql reference manual and find that the added users have the following words:
The two accounts have the same username and password "monty" and "some_pass. Both accounts are superuser accounts and have full permissions to do anything. An account ('monty '@ 'localhost') is only used for connection from the local machine. Another account ('monty '@' % ') can be used to connect from other hosts. Note that the two accounts of monty must be able to connect to monty from any host. There is no localhost account. When monty is connected from the local machine, the anonymous user account of localhost created by mysql_install_db takes the lead. As a result, monty is considered an anonymous user. The reason is that the Host column value of the anonymous user account is more specific than that of the 'monty '@' % 'account, so that it is ranked first in the sorting order of the user table.
So % cannot log on to the Local Machine (try remote login again tomorrow ~)
==========================================
Tested in the morning. % you can log on remotely ~~