2025-03-14T02:41:41.212250Z 0 [System] [MY-015017] [Server] MySQL Server Initialization - start. 2025-03-14T02:41:41.213204Z 0 [Warning] [MY-010915] [Server] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release. 2025-03-14T02:41:41.213243Z 0 [System] [MY-013169] [Server] /usr/bin/mysqld (mysqld 9.2.0) initializing of server in progress as process 19340 2025-03-14T02:41:41.225654Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2025-03-14T02:41:41.492273Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended. 2025-03-14T02:41:42.326345Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: o,FRbratO8U6 2025-03-14T02:41:44.238961Z 0 [System] [MY-015018] [Server] MySQL Server Initialization - end. [zcx@archlinux LogBuild]$ grep 'temporary password' /var/log/mysqld.log
1.1.2. 启动Mysql服务
1 2 3 4 5
systemctl start mysqld.service
systemctl status mysqld.service
systemctl enable mysqld.service
1.1.3. 登陆Mysql
1 2 3
# 输入密码即可 mysql -u root -p Enter password:
1.1.4. 修改root密码
1
alter user 'root'@'localhost' identified by 'geek';