centos7安装MariaDB

  

      一、MariaDB介绍  

    新版本的REDHAT内核Linux,如Fedora 21,Centos7中,都通过安装MariaDB来使用MySQL.

    MariaDB是mysql的一个分支,MariaDB由MySQL的创始人Michael Widenius(英语:Michael Widenius)主导开发,MariaDB名称来自Michael Widenius的女儿Maria的名字。Michael Widenius在意识到Oracle会对MySQL许可做什么后将MariaDB分离了出来。

    下图是一张MariaDB与Mysql的性能比较。


    二、安装Mariadb

        在centos7的软件库中搜索mariadb,你会发现如下相关软件包,一般

[root@ctl-net ~]# yum search MariaDB
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirror.neu.edu.cn
 * epel: mirror01.idc.hinet.net
 * extras: mirror.neu.edu.cn
 * updates: mirror.neu.edu.cn
===================================================== N/S matched: MariaDB =====================================================
mariadb-bench.x86_64 : MariaDB benchmark scripts and data
mariadb-devel.i686 : Files for development of MariaDB/MySQL applications
mariadb-devel.x86_64 : Files for development of MariaDB/MySQL applications
mariadb-embedded.i686 : MariaDB as an embeddable library
mariadb-embedded.x86_64 : MariaDB as an embeddable library
mariadb-embedded-devel.i686 : Development files for MariaDB as an embeddable library
mariadb-embedded-devel.x86_64 : Development files for MariaDB as an embeddable library
mariadb-libs.i686 : The shared libraries required for MariaDB/MySQL clients
mariadb-libs.x86_64 : The shared libraries required for MariaDB/MySQL clients
mariadb-server.x86_64 : The MariaDB server and related files
mariadb.x86_64 : A community developed branch of MySQL
mariadb-test.x86_64 : The test suite distributed with MariaD

    在这里我们只需安装客户端mariadb.x86_64与服务器端mariadb-server.x86_64,执行 如下命令

yum install -y mariadb.x86_64 mariadb-server.x86_64

     安装了mariadb.x86_64mariadb-server.x86_64后,执行如下命令启动数据库服务

systemctl start mariadb.service

    设置开机启动

systemctl enable mariadb.service

     然后设置root密码

 mysqladmin -u root password 'newpassword'

     设置了密码后,就可以使用如下命令登陆数据库了

mysql -uroot -p newpassword

 


    三、备注  

 安装mariadb.x86_64其实安装了如下等命令:

mysql            mysqladmin       mysqlcheck       mysql_find_rows  mysqlshow        mysql_waitpid    
mysqlaccess      mysqlbinlog      mysqldump        mysqlimport      mysqlslap 

     安装mariadb-server.x86_64后,有如下等命令

mysql                       mysqld_multi                mysqlimport                 mysqltest
mysqlaccess                 mysqld_safe                 mysql_install_db            mysql_tzinfo_to_sql
mysqladmin                  mysqldump                   mysql_plugin                mysql_upgrade
mysqlbinlog                 mysqldumpslow               mysql_secure_installation   mysql_waitpid
mysqlbug                    mysql_find_rows             mysql_setpermission         mysql_zap
mysqlcheck                  mysql_fix_extensions        mysqlshow                   
mysql_convert_table_format  mysqlhotcopy                mysqlslap  

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
永久连接: http://www.nfvschool.cn/?p=140
标签:

发表评论