安装:
1 | sudo pacman -Syy mysql |
初始化:
1 | mysqld --initialize --user=mysql --basedir=/usr --datadir=/data/mysql |
输出:
1 | 2018-10-24T02:50:36.847221Z 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. |
启动:
1 | systemctl start mysqld |
使用临时密码登录并修改密码:
1 | mysql -u root -p |