Are Users 'User'@'%' and 'User'@'localhost' not the same?

前端 未结 4 1976
长发绾君心
长发绾君心 2020-12-05 01:59

I created a user per the first command but cannot logon via localhost (linux). This link mysqldoc indicates that I need to create a second user by the same name, but usin

4条回答
  •  甜味超标
    2020-12-05 02:56

    Basically yes, those are two different users with (possibly) different permissions and (possibly) different passwords.

    • myuser@% : User myuser, connecting from any host.
    • myuser@localhost : User myuser, connecting from localhost only.

    A good read is the MySQL manual about connection access, it demonstrates how it works.

提交回复
热议问题