gpt4 book ai didi

mysql - GRANTPRIVILEGES 是否会覆盖现有的用户和密码?

转载 作者:行者123 更新时间:2023-11-29 05:38:19 25 4
gpt4 key购买 nike

执行以下命令:

GRANT ALL PRIVILEGES ON myblog.* TO "wordpress"@"localhost" IDENTIFIED BY "summer";

如果执行,设置一个新密码,当已经有一个密码为winter的现有用户wordpress?

最佳答案

是的,确实如此。

When the IDENTIFIED BY clause is present and you have global grant privileges, the password becomes the new password for the account, even if the account exists and already has a password. With no IDENTIFIED BY clause, the account password remains unchanged.

引自MySQL documentation

关于mysql - GRANTPRIVILEGES 是否会覆盖现有的用户和密码?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8833280/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com