1.安装 MariaDB repository
* 在64位系统上安装MariaDB 10.0
### CentOS 7.x 64位 MariaDB 10.0 ##
cat <
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.0/rhel7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
EOF
------------OR------------
### CentOS 6.x 64位 MariaDB 10.0 ##
cat <
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.0/rhel6-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
EOF
------------OR------------
### CentOS 5.x 64位 MariaDB 10.0 ##
cat <
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.0/rhel5-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
EOF
------------OR------------
* 在64位系统上安装MariaDB 5.5
### CentOS 7.x 64位 MariaDB 5.5 ##
cat <
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/5.5/rhel7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
EOF
------------OR------------
### CentOS 6.x 64位 MariaDB 5.5 ##
cat <
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/5.5/rhel6-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
EOF
------------OR------------
### CentOS 5.x 64位 MariaDB 5.5 ##
cat <
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/5.5/rhel5-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
EOF
2.安装 MariaDB 10/5.5
### CentOS 7/6.6/5.11 and Red Hat (RHEL) 7/6.6/5.11 ###
yum install MariaDB MariaDB-server
3.启动MariaDB server并设置为开机运行
### CentOS 7/6.6/5.11 and Red Hat (RHEL) 7/6.6/5.11 ###
service mysql start
chkconfig mysql on
4.MariaDB (MySQL) 安全设置
### 自己跟着命令行来就行了 ###
/usr/bin/mysql_secure_installation
5.本地登录 MySQL database 测试
mysql -u root -p
6.修改mysql root密码
mysql>use mysql
mysql>UPDATE mysql.user SET password=PASSWORD('passwd') WHERE User='root';
mysql>FLUSH PRIVILEGES;
好了,就到这里吧.