MariaDB 10.0发布 - 在CentOS/RHEL中安装MariaDB 10

MariaDB10.0稳定版已经发布于 2014年3月31日 ,这是一个MySQL的增强,直接替代。 MariaDB可能是为数据库专业人员寻找一个 强大的可扩展的, 可靠的SQL服务器选择一个更好的选择。 MariaDB有一些更新的功能对MySQL。使用下面的链接阅读MariaDB和MySQL之间的功能对比 本文将帮助你使用yum在CentOS的,RHEL 6/5和Fedora 19/18/17系统上安装MariaDB10.0。下面有鉴于MariaDB10.0一些显着的变化
    • Audit Plugin 现在包括在MariaDB。
    • 通过固定刷新页面的不正确的计算改进XtraDB性能。
    • 修正了GTID multi-master 漏洞。
    • 现在默认TokuDB压缩TOKUDB_ZLIB。
    • 各种算法的改进engine-independent无关的表统计信息。

第1步:添加MariaDB Yum库

首先在我们的系统中添加MariaDByum软件库。创建您的系统的新文件 /etc/yum.repos.d/mariadb.repo以下代码添加按你的操作系统和体系结构。
为CentOS / RHEL 6的64位
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.0/rhel6-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
为CentOS / RHEL-6位32
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.0/rhel6-x86
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
为CentOS / RHEL-5 64位
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.0/rhel5-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
为CentOS / RHEL-5 32位
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.0/rhel5-x86
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
为Fedora 19/18/17 - 64位
请在下面设置根据您使用的Fedora版本更改版本(红色高亮显示)。点击 这里查看所有可用的存储库。
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.0/fedora19-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
为Fedora 19/18/17 - 32位
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.0/fedora19-x86
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

第2步:安装MariaDB

让我们用下面的命令在你的系统中安装MariaDB10.0。这也将自动安装其他依赖。
# yum install MariaDB-server MariaDB-client
在你的系统中安装MariaDB之后,让我们用下面的命令来启动服务。
# service mysql start

第3步:安全MariaDB安装

最后,我们需要确保我们的MariaDB安装与初始密码,并做一些其他的变化。要做到命令行运行这个安全的安装脚本。
# mysql_secure_installation
安全的安装脚本会要求用户输入一些点,按照安装为每个输出下面显示,所有的用户输入都突出显示了。
/usr/bin/mysql_secure_installation: line 379: find_mysql_client: command not found

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user.  If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none): [Press Enter]
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.

Set root password? [Y/n] y
New password: [Enter Password Here]
Re-enter new password: [Re-enter Password Here]
Password updated successfully!
Reloading privilege tables..
 ... Success!

By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] y
 ... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] y
 ... Success!

By default, MariaDB comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] y
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] y
 ... Success!

Cleaning up...

All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!

第4步:验证连接

安装和配置完毕后,使用以下命令连接到服务器MariaDB
# mysql -u root -p

Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or g.
Your MariaDB connection id is 11
Server version: 10.0.10-MariaDB MariaDB Server

Copyright (c) 2000, 2014, Oracle, SkySQL Ab and others.

Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.

MariaDB [(none)]>
你也可能需要 安装phpMyAdmin使用web界面,它提供方便的工作方式来管理MariaDB。
赞(52) 打赏
未经允许不得转载:优客志 » 系统运维
分享到:

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏