加入收藏 | 设为首页 | 会员中心 | 我要投稿 拼字网 - 核心网 (https://www.hexinwang.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > MsSql教程 > 正文

mysql8.0修改密码及远程访问设置

发布时间:2022-12-08 13:03:12 所属栏目:MsSql教程 来源:未知
导读: 在【mysqld】模块添加:skip-grant-tables 保存退出后重启mysql;
1.mysql -u root -p
2.use mysql
3. update user set authentication_string = '' where user = 'root';

在【mysqld】模块添加:skip-grant-tables 保存退出后重启mysql;

1.mysql -u root -p

2.use mysql

3. update user set authentication_string = '' where user = 'root';

my.cnf文件注释该行  # skip-grant-tables

ALTER USER 'root'@'localhost' IDENTIFIED BY 'root密码';

ALTER USER 'root'@'%' IDENTIFIED BY 'root密码';

1.GRANT ALL ON 表示所有权限,% 表示通配所有 host重启mssql,可以访问远程。

GRANT ALL ON *.* TO 'root'@'%';

2. 刷新权限 flush privileges;

3. 查看当前 rootuser 表中 用户的相关信息

select host, user, authentication_string, plugin from user;

解决1044错误问题:

1044问题实质是因为你的mysql数据库没有设值密码或者密码不正确导致的。

(编辑:拼字网 - 核心网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!