[root@localhost ~]# systemctl status mysqld ● mysqld.service - MySQL Server Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled) Active: active (running) since 三 2020-08-12 13:08:40 CST; 22s ago Docs: man:mysqld(8) http://dev.mysql.com/doc/refman/en/using-systemd.html Main PID: 30522 (mysqld) CGroup: /system.slice/mysqld.service └─30522 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid
8月 12 13:08:34 localhost.localdomain systemd[1]: Starting MySQL Server... 8月 12 13:08:40 localhost.localdomain systemd[1]: Started MySQL Server.
使用mysql初始密码登录
mysql的初始密码在哪儿呢?
1 2 3 4 5 6 7 8 9 10
[root@localhost ~]# cat /var/log/mysqld.log 2020-08-12T05:08:34.775425Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see doc umentation for more details).2020-08-12T05:08:35.467104Z 0 [Warning] InnoDB: New log files created, LSN=45790 2020-08-12T05:08:35.571012Z 0 [Warning] InnoDB: Creating foreign key constraint system tables. 2020-08-12T05:08:35.636312Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: dffd9de5-dc59-11ea-9b06-000c298217df.2020-08-12T05:08:35.639692Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened. 2020-08-12T05:08:36.708627Z 0 [Warning] CA certificate ca.pem is self signed. 2020-08-12T05:08:36.737506Z 1 [Note] A temporary password is generated for root@localhost: lug76/d98m!F 2020-08-12T05:08:39.278229Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see doc umentation for more details).