mysql8 注意事项

ubuntu系统下 要修改mysql配置 workbench才可以连 tcp/ip over ssh
[mysqld]
bind-address          = 127.0.0.1
#skip-grant-tables

恢复密码忘记root密码
在配置文件[mysqld] 打开skip-grant-tables 启动mysql
mysql -uroot连上,
在配置文件[mysqld] 关闭skip-grant-tables mysql重载配置文件
ALTER USER ‘root’@’127.0.0.1’ IDENTIFIED WITH mysql_native_password BY ‘xxxx’;
flush privileges;

caching_sha2_password不支持的解决办法,

ALTER USER 'mysqlUsername'@'localhost' IDENTIFIED WITH mysql_native_password BY 'mysqlUsernamePassword';
 CREATE USER 'jeffrey'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';

发表评论

电子邮件地址不会被公开。 必填项已用*标注