2019-05-12T12:45:20.890020Z 0 [System] [MY-013169] [Server] /usr/libexec/mysqld (mysqld 8.0.13) initializing of server in progress as process 40113 2019-05-12T12:45:23.643786Z 5 [Warning] [MY-010453] [Server] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option. 2019-05-12T12:45:26.199807Z 0 [System] [MY-013170] [Server] /usr/libexec/mysqld (mysqld 8.0.13) initializing of server has completed 2019-05-12T12:45:28.821217Z 0 [System] [MY-010116] [Server] /usr/libexec/mysqld (mysqld 8.0.13) starting as process 40159 2019-05-12T12:45:29.877569Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed. 2019-05-12T12:45:29.987015Z 0 [System] [MY-010931] [Server] /usr/libexec/mysqld: ready for connections. Version: '8.0.13' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution. 2019-05-12T12:45:30.206112Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: '/var/lib/mysql/mysqlx.sock' bind-address: '::' port: 33060
知道mysql8的root账号密码为空,所以需要登录后,初始化密码。
alter user 'root'@'localhost' identified with mysql_native_password by '123456'; update user set host='%' where user='root'; flush privileges;