to-red

 为了安全,MySQL开启了远程访问,需要经常更换MySQL连接密码。

不知道自己有没有开启远程访问,就先看看

use mysql
select host, user from user;

如果是 localhost root,则只能本地访问。如果是 % root则可以远程访问。

修改密码,是否为localhost用户决定了这里的修改密码的用户,根据自己的用户更改

alter user \'root\'@\'localhost\' identified by \'密码\';
alter user \'root\'@\'%\' identified by \'密码\';

如果报错:Your password does not satisfy the current policy requirements。。。说明密码不够复杂

 

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2021-12-16
  • 2022-01-01
  • 2022-12-23
  • 2022-12-23
  • 2022-01-02
  • 2021-12-17
  • 2021-11-21
猜你喜欢
  • 2021-12-16
  • 2021-12-04
  • 2021-12-04
  • 2021-12-05
  • 2021-08-27
相关资源
相似解决方案