尝试安装MySQL,但是通过 systemctl start mysql.service 启动报错了
搜索发现:
- 由于MySQL在CentOS7中收费了,所以已经不支持MySQL了
- 取而代之在CentOS7内部集成了mariadb,而安装MySQL的话会和MariaDB的文件冲突
- 所以可以直接安装mariadb。
安装mariadb的步骤:
- yum install -y mariadb-server
- systemctl start mariadb.service
- 设置开机启动: systemctl enable mariadb.service
- 设置密码等:mysql_secure_installation