Home > database >  Mysql user login and permissions problem
Mysql user login and permissions problem

Time:10-02

1, own server in the company built a mysql5.6, later found on SSH remote login to that service for the root user can log in mysql, but cannot log in the local machine, said after finding out information to the mysql database user list under the host field is localhost to wildcard %, as shown in figure

Modified the local can login,
2, but modified, found on SSH remote login server to that one./mysql -u root -p and enter the password can't login mysql, an ERROR for the ERROR 1045 (28000) : Access denied for user 'root' @ 'localhost' (using password: YES), but with./mysql -u root can log in, just don't have any authority, the individual feels localhost is match to the picture that line, question is why use./mysql -u root -p unable to login? Figure in the first record in the % wildcards, isn't it normally can match localhost?
3, when I make a copy of the first record, and change the % to localhost only after use./mysql -u root -p password can log in, it's strange that % can't match the localhost?
  • Related