1.修改密码验证策略,如果不修改简单密码无法创建

  • 在my.cnf中添加以下内容:
validate_password.policy=0
validate_password.length=6
validate_password.mixed_case_count=0
validate_password.special_char_count=0
validate_password.length=6
  • 重启mysqld

2.创建用户

create user 'tab_ding'@'%' identified by '123456';
flush privileges;

3.给用户添加管理员权限

grant all privileges on *.* to  'tab_ding'@'%';
flush privileges;

4.Navicat和heisql登录时提示:caching_sha2_password

  • 已创建用户修改
ALTER USER 'tab_ding'@'%' IDENTIFIED WITH mysql_native_password BY '123456';
FLUSH PRIVILEGES;
  • 默认创建用户修改,在my.cnf中添加
default_authentication_plugin = mysql_native_password