Windows环境下安装 mysql-8.0.11-winx64 遇到的问题解决办法 (2)

这时要重新生成密码,删除data目录,运行mysqld --initialize --console,

F:\mysql\mysql-8.0.11-winx64\bin>mysqld --initialize --console 2018-10-29T10:04:23.337650Z 0 [System] [MY-013169] [Server] F:\mysql\mysql-8.0.11-winx64\bin\mysqld.exe (mysqld 8.0.11) initializing of server in progress as process 7928 2018-10-29T10:05:19.210237Z 5 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: RXZG!fJR2Ly+ 2018-10-29T10:06:00.603070Z 0 [System] [MY-013170] [Server] F:\mysql\mysql-8.0.11-winx64\bin\mysqld.exe (mysqld 8.0.11) initializing of server has completed

重新执行mysql -u root -p,填入密码(注意密码左右没有空格),这时会打印出相关的信息

F:\mysql\mysql-8.0.11-winx64\bin>mysql -u root -p Enter password: ************ Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 8 Server version: 8.0.11 Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. 修改用户密码,在MySQL中执行命令:ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '新密码';,出现下面情况就证明你已经修改成功。 mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '5502yulijian.'; Query OK, 0 rows affected (0.17 sec) show databases; (‘;’一定要加

Windows环境下安装 mysql-8.0.11-winx64 遇到的问题解决办法

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/zwyxxp.html