CentOS/RHEL 7/6.6/5.11上yum安装MariaDB
时间:2016-06-04 21:58来源:linux.it.net.cn 作者:IT
1.安装 MariaDB repository
* 在64位系统上安装MariaDB 10.0
1 |
### CentOS 7.x 64位 MariaDB 10.0 ## |
2 |
cat <<EOF > /etc/yum.repos.d/MariaDB.repo |
5 |
baseurl = http://yum.mariadb.org/10.0/rhel7-amd64 |
6 |
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB |
------------OR------------
1 |
### CentOS 6.x 64位 MariaDB 10.0 ## |
2 |
cat <<EOF > /etc/yum.repos.d/MariaDB.repo |
5 |
baseurl = http://yum.mariadb.org/10.0/rhel6-amd64 |
6 |
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB |
------------OR------------
1 |
### CentOS 5.x 64位 MariaDB 10.0 ## |
2 |
cat <<EOF > /etc/yum.repos.d/MariaDB.repo |
5 |
baseurl = http://yum.mariadb.org/10.0/rhel5-amd64 |
6 |
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB |
------------OR------------
* 在64位系统上安装MariaDB 5.5
1 |
### CentOS 7.x 64位 MariaDB 5.5 ## |
2 |
cat <<EOF > /etc/yum.repos.d/MariaDB.repo |
5 |
baseurl = http://yum.mariadb.org/5.5/rhel7-amd64 |
6 |
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB |
------------OR------------
1 |
### CentOS 6.x 64位 MariaDB 5.5 ## |
2 |
cat <<EOF > /etc/yum.repos.d/MariaDB.repo |
5 |
baseurl = http://yum.mariadb.org/5.5/rhel6-amd64 |
6 |
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB |
------------OR------------
1 |
### CentOS 5.x 64位 MariaDB 5.5 ## |
2 |
cat <<EOF > /etc/yum.repos.d/MariaDB.repo |
5 |
baseurl = http://yum.mariadb.org/5.5/rhel5-amd64 |
6 |
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB |
2.安装 MariaDB 10/5.5
1 |
### CentOS 7/6.6/5.11 and Red Hat (RHEL) 7/6.6/5.11 ### |
2 |
yum install MariaDB MariaDB-server |
3.启动MariaDB server并设置为开机运行
1 |
### CentOS 7/6.6/5.11 and Red Hat (RHEL) 7/6.6/5.11 ### |
4.MariaDB (MySQL) 安全设置
2 |
/usr/bin/mysql_secure_installation |
5.本地登录 MySQL database 测试
6.修改mysql root密码
2 |
mysql>UPDATE mysql.user SET password=PASSWORD('passwd') WHERE User='root'; |
3 |
mysql>FLUSH PRIVILEGES;
|
(责任编辑:IT) |
------分隔线----------------------------