MariaDB简介
MariaDB数据库管理系统是MySQL的一个分支,主要由开源社区在维护,采用GPL授权许可 MariaDB的目的是完全兼容MySQL,包括API和命令行,使之能轻松成为MySQL的代替品。在存储引擎方面,使用XtraDB(英语:XtraDB)来代替MySQL的InnoDB。 MariaDB由MySQL的创始人Michael Widenius(英语:Michael Widenius)主导开发,他早前曾以10亿美元的价格,将自己创建的公司MySQL AB卖给了SUN,此后,随着SUN被甲骨文收购,MySQL的所有权也落入Oracle的手中。MariaDB名称来自Michael Widenius的女儿Maria的名字。
MariaDB 官网:https://mariadb.org/MariaDB 下载:https://downloads.mariadb.org/MariaDB Github地址:https://github.com/MariaDB/server安装MariaDB 5.5
安装MariaDB 5.5是CentOS 7的默认版本,配置数据库服务器
[root@linuxprobe~]# yum -y install mariadb-server[root@linuxprobe~]# vi /etc/my.cnf# add follows within [mysqld] section[mysqld]character-set-server=utf8[root@linuxprobe~]# systemctl start mariadb[root@linuxprobe~]# systemctl enable mariadbln -s '/usr/lib/systemd/system/mariadb.service' '/etc/systemd/system/multi-user.target.wants/mariadb.service'
初始化MariaDB
复制代码 代码如下:[root@linuxprobe~]# mysql_secure_installation #和MySQL一样,一路y连接MariaDB
[root@linuxprobe ~]# mysql -u root -pEnter password: Welcome to the MariaDB monitor. Commands end with ; or /g.Your MariaDB connection id is 1023Server version: 5.5.50-MariaDB MariaDB ServerCopyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.Type 'help;' or '/h' for help. Type '/c' to clear the current input statement.MariaDB [(none)]> select user,host,password from mysql.user;+-----------+-----------+-------------------------------------------+| user | host | password |+-----------+-----------+-------------------------------------------+| root | localhost | *F1DAE8BCDFCA7A57F246E0F834AC35830A3D640E || root | 127.0.0.1 | *F1DAE8BCDFCA7A57F246E0F834AC35830A3D640E || root | ::1 | *F1DAE8BCDFCA7A57F246E0F834AC35830A3D640E |+-----------+-----------+-------------------------------------------+5 rows in set (0.00 sec)MariaDB [(none)]> show databases;+--------------------+| Database |+--------------------+| information_schema || mysql || performance_schema |+--------------------+5 rows in set (0.05 sec)MariaDB [(none)]> exit;Bye
防火墙开启3306端口
# 客户端设置[root@vdevops ~]# firewall-cmd --add-service=mysql --permanentsuccess[root@vdevops ~]# firewall-cmd --reloadsuccess
安装phpMyAdmin
前提安装web服务器和php,参考下面:
http://www.jb51.net/article/97434.htm
http://www.jb51.net/article/97587.htm
安装phpMyAdmin
# install from EPEL[root@linuxprobe~]# yum --enablerepo=epel -y install phpMyAdmin php-mysql php-mcrypt[root@linuxprobe~]# vi /etc/httpd/conf.d/phpMyAdmin.conf# line 17: IP address you permit to accessRequire ip 127.0.0.1 10.1.1.0/24# line 34: IP address you permit to accessRequire ip 127.0.0.1 10.1.1.o/24[root@linuxprobe ~]# systemctl restart httpd
新闻热点
疑难解答