jianglilili / jianglilili/MySQL

关于添加MySQL用户遇到的问题

Open
#1 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

You can use:

SET PASSWORD FOR 'root' = PASSWORD('elephant7');
or, in latest versions:

SET PASSWORD FOR root = 'elephant7'
You can also use:

UPDATE user SET password=password('elephant7') WHERE user='root';
but in Mysql 5.7 the field password is no more there, and you have to use:

UPDATE user SET authentication_string=password('elephant7') WHERE user='root';
Regards

**注意**:在 MySQL5.7 中 user 表的 password 已换成了**authentication_string**。
**注意**:**password()** 加密函数已经在 8.0.11 中移除了,可以使用 MD5() 函数代替。

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.