Solve the problems of starting the server of Mysql, changing the initial password and connection in workbench. If you get any problems, please give feedback to us.
切换到mysql server文件夹下,开启服务
1 | C:\Program Files\MySQL\MySQL Server 8.0>net start mysql |
1 | C:\Program Files\MySQL\MySQL Server 8.0>mysqld --install |
打开服务后,在mysqlworkbench中尝试连接,密码要从C:\Program Files\MySQL\MySQL Server 8.0\data下的.err文件中查看
找到你文件中类似如下log信息1
2019-05-30T10:11:32.700142Z 5 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: ty.)Vv_y#6uU
root@localhost后的一串乱码就是你第一次登陆的密码。
在workbench登陆之前需要改动密码
先进入mysql1
2C:\Program Files\MySQL\MySQL Server 8.0>mysql -u root -p
Enter password: ********
1 | mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'fuck'; |
就可以在workbench中以fuck为密码登陆了