“IDENTIFIED BY 'password'” in MySQL

前端 未结 4 708
栀梦
栀梦 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:54

    Code below gives full access to all databases. Other commands mentioned in answers are work if you have the specific databases in the mysql server. Code below is works regardless of the state in which the server is in. Just login to the linux server -> type mysql and enter:

    GRANT ALL privileges ON *.* TO 'user'@'host'  identified BY 'password';
    

提交回复
热议问题