Using % for host when creating a MySQL user

前端 未结 6 1579
醉酒成梦
醉酒成梦 2020-11-29 18:06

My MySQL database needs two users: appuser and support.
One of the application developers insists that I create four accounts for these users:

appuser@\'         


        
6条回答
  •  南方客
    南方客 (楼主)
    2020-11-29 18:41

    As @nos pointed out in the comments of the currently accepted answer to this question, the accepted answer is incorrect.

    Yes, there IS a difference between using % and localhost for the user account host when connecting via a socket connect instead of a standard TCP/IP connect.

    A host value of % does not include localhost for sockets and thus must be specified if you want to connect using that method.

提交回复
热议问题