安装mysql
yum install mariadb mariadb-server MySQL-python mysql-devel
Package MySQL-python-1.2.5-1.ibm.el7.x86_64 already installed and latest version
=================================================================================================================================== Package Arch Version Repository Size =================================================================================================================================== Installing: mariadb x86_64 1:5.5.41-2.el7_0 core-0 8.9 M mariadb-server x86_64 1:5.5.41-2.el7_0 core-0 11 M Installing for dependencies: perl-Compress-Raw-Bzip2 x86_64 2.061-3.el7 core-0 32 k perl-Compress-Raw-Zlib x86_64 1:2.061-4.el7 core-0 57 k perl-DBD-MySQL x86_64 4.023-5.el7 core-0 140 k perl-DBI x86_64 1.627-4.el7 core-0 802 k perl-Data-Dumper x86_64 2.145-3.el7 core-0 47 k perl-IO-Compress noarch 2.061-2.el7 core-0 260 k perl-Net-Daemon noarch 0.48-5.el7 core-0 51 k perl-PlRPC noarch 0.2020-14.el7 core-0 36 k Transaction Summary =================================================================================================================================== Install 2 Packages (+8 Dependent packages)
启动服务
systemctl enable mariadb.service
systemctl start mariadb.service
初始化数据库
mysql_secure_installation