“IDENTIFIED BY 'password'” in MySQL

前端 未结 4 706
栀梦
栀梦 2020-12-14 06:30

I often see in many MySQL tutorials that people use command IDENTIFIED BY \'password\' both during user creation and granting him privileges.

For examp

4条回答
  •  情话喂你
    2020-12-14 06:39

    It's just an added security measure. You might have different passwords for the same user on different servers, for example in a shared host environment. If it's your own server and you and your colleagues are the only ones who use it then you don't need to identify the users you grant privileges to.

    If you identify users then only the password you specify can be used with that user to perform those privileges.

提交回复
热议问题