2019-10-06T06:11:27.818450Z 0 [System] [MY-013169] [Server] C:\Program Files\MySQL\mysql-8.0.17-winx64\bin\mysqld.exe (mysqld 8.0.17) initializing of server in progress as process 15744
2019-10-06T06:11:27.820584Z 0 [Warning] [MY-013242] [Server] --character-set-server: 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
2019-10-06T06:11:31.643420Z 5 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: :mX_bf%gJ0E!
2019-10-06T06:11:33.365916Z 0 [System] [MY-013170] [Server] C:\Program Files\MySQL\mysql-8.0.17-winx64\bin\mysqld.exe (mysqld 8.0.17) initializing of server has completed
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 8.0.17
Copyright (c) 2000, 2019, 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> show databases;
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
修改密码:
mysql> alter user 'root'@'localhost' identified by '1234'
-> ;
Query OK, 0 rows affected (0.03 sec)