真的是很激动,修改了好几天mysql与其使用工具的连接问题,终于修改成功
错误问题是本地的mysql服务加密方式有问题,在使用工具上会报错#1251的错误
修改方法:
1. 建议将之前的mysql服务删除掉,具体删除方法网上很全
2.安装好新的mysql后,cd 命令进入mysql安装的bin目录下
3.输入密码(初始化mysql会有默认密码,注意捕获)
2018-10-06T02:58:06.216123Z 5 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost:
后会提示:
Enter password: ******Welcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 18Server version: 8.0.11 MySQL Community Server - GPLCopyright © 2000, 2018, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.mysql>
4.更改加密方式
mysql> ALTER USER ‘root’@‘localhost’ IDENTIFIED BY ‘password’ PASSWORD EXPIRE NEVER;
会提示:Query OK, 0 rows affected (0.10 sec)
5.更改密码(以 1234 为例子 ):
mysql> ALTER USER ‘root’@‘localhost’ IDENTIFIED WITH mysql_native_password BY ‘1234’;
6.刷新:mysql> FLUSH PRIVILEGES;
然后到mysql的使用工具中测试就可以了,连接属性里密码是修改过的,要留意下。