1、下载MariaDB

下载地址:https://downloads.mariadb.org/mariadb/10.1.14/

这里选择mariadb-10.1.14-linux-x86_64.tar.gz,下载过程中如果出现404错误,可以在网站右下角选择其他镜像地址,下载完成后,使用pscp工具将其传送到CentOS中

2、解压缩

[root@localhost ~]# cd /usr/local/
[root@localhost local]# tar -zxvf mariadb-10.1.14-linux-x86_64.tar.gz
[root@localhost local]# mv mariadb-10.1.14-linux-x86_64 mysql

3、初始化数据库

[root@localhost local]# groupadd mysql

[root@localhost local]# useradd -r -g mysql -s /bin/false mysql

[root@localhost local]# cd mysql

[root@localhost mysql]# chown -R root:root .

[root@localhost mysql]# chown -R mysql:mysql data

[root@localhost mysql]# ./scripts/mysql_install_db --user=mysql --datadir=./data

4、修改配置文件,并设置utf8编码格式、启动慢查询日志

[root@localhost mysql]# cp ./support-files/my-huge.cnf /etc/my.cnf

[root@localhost mysql]# vim /etc/my.cnf

[mysql]

default-character-set=utf8

...

[mysqld]

character-set-server=utf8

collation-server=utf8_general_ci

slow_query_log = 1

...

5、启动mysql服务、设置root密码

[root@localhost mysql]# ./bin/mysqld_safe --user=mysql &

[root@localhost mysql]# ./bin/mysqladmin -uroot password 'root'

6、使用mysql客户端

[root@localhost mysql]# mysql -uroot -proot

Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 4
Server version: 10.1.14-MariaDB MariaDB Server

Copyright (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)]> \s
--------------
./bin/mysql  Ver 15.1 Distrib 10.1.14-MariaDB, for Linux (x86_64) using readline                                                                                         5.1

Connection id:          4
Current database:
Current user:           root@localhost
SSL:                    Not in use
Current pager:          stdout
Using outfile:          ''
Using delimiter:        ;
Server:                 MariaDB
Server version:         10.1.14-MariaDB MariaDB Server
Protocol version:       10
Connection:             Localhost via UNIX socket
Server characterset:    utf8
Db     characterset:    utf8
Client characterset:    utf8
Conn.  characterset:    utf8
UNIX socket:            /tmp/mysql.sock
Uptime:                 37 min 55 sec

Threads: 2  Questions: 14  Slow queries: 0  Opens: 17  Flush tables: 1  Open tab                                                                                        les: 11  Queries per second avg: 0.006
--------------

MariaDB [(none)]>

7、注册系统服务
[root@localhost mysql]# cp ./support-files/mysql.server /etc/init.d/mysqld

[root@localhost mysql]#  chkconfig --add mysqld # 加入开机自动启动

[root@localhost mysql]# systemctl start mysqld

8、遇到的问题

启动mysql服务时候,提示错误

/mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory

安装libaio-devl开发库即可

[root@localhost mysql]# yum install -y libaio-devel

CentOS7安装MariaDB10.1.14的更多相关文章

  1. CentOS7 安装Nginx 1.14:

      nginx-1.14.2.tar.gz:下载:wget http://nginx.org/download/nginx-1.14.2.tar.gz 安装nginx:   yum  install  ...

  2. centos7安装mariadb10遇到的问题解决

    4. 安装中的错误 4.1 /bin/ld: cannot find -lz /bin/ld: cannot find -lzcollect2: error: ld returned 1 exit s ...

  3. CentOS7安装ZooKeeper3.4.14

    1:下载安装包 wget https://downloads.apache.org/zookeeper/zookeeper-3.4.14/zookeeper-3.4.14.tar.gz 点击进入官网下 ...

  4. linux(centos7) 安装nginx

    linux(centos7) 安装nginx 1.14(stable) 版本 Nginx配置文件常见结构的从外到内依次是「http」「server」「location」等等,缺省的继承关系是从外到内, ...

  5. CentOS7下使用YUM安装mariadb10

    1:由于centos7 默认使用yum安装MySQL的话就会安装mariadb,只是安装的版本停留在mariadb5.x,版本比较低.如果我们需要安装mariadb10这里就需要删除mariadb-l ...

  6. CentOS7安装mongoDB数据库

    CentOS7安装mongoDB数据库 时间:2015-03-03 16:45来源:blog.csdn.net 作者:进击的木偶 举报 点击:8795次 mongoDB是目前发展比较好的NOSQL数据 ...

  7. Centos7 安装MPlayer过程详解

    使用自带的totem基本上都无法播放视频,各种格式都不支持,令人无语.想到了MPlayer,为了看片,决定编译安装,过程真的是折腾.如图是自带的Totem播放提示,安装了解码还是无法播放,反正要找其他 ...

  8. centos 7.3二进制安装mariadb10.2.8完美步骤

    (1)在centos7系统上,yum info mariadb可以找到提供mariadb包的官方网站,在到官方网站下载最新的mariadb包,然后rz到linux系统上去 (2)准备用户 1.user ...

  9. Centos7 安装python3

    Centos7 安装python3 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 #安装sqlite-devel yum -y ...

随机推荐

  1. Predicate<T>与Func<T, bool>泛型委托

    引用别人的: static void Main(string[] args) { List<string> l = new List<string>(); l.Add(&quo ...

  2. 保护眼睛(ubuntu 和 chrome)

    chrome 安插件https://chrome.google.com/webstore/detail/%E4%BF%9D%E6%8A%A4%E7%9C%BC%E7%9D%9B/fgadnbmmoln ...

  3. 配置Office 365单点登录过程中的一些注意事项

    这些天一直在整O365单点登录的问题,其中涉及到了很多知识点,其中以ADFS,CA为主吧,IIS为辅.下面我就把这些天积累的一些经验写下来备用. 1. 申请证书不一定要通过“证书颁发机构Web注册”, ...

  4. 前端开发与SEO

    前端开发中通过一些小习惯,可以有利于SEO,本着蚊子再小也是肉的原则,能抓住自然不能忽略. 1.控制首页链接数量,不能过多,也不要太少.更不要为了凑数而添加 2.扁平化层次,力争跳转三次可以到任何页面 ...

  5. [kuangbin带你飞]专题十 匹配问题 二分匹配部分

    刚回到家 开了二分匹配专题 手握xyl模板 奋力写写写 终于写完了一群模板题 A hdu1045 对这个图进行 行列的重写 给每个位置赋予新的行列 使不能相互打到的位置 拥有不同的行与列 然后左行右列 ...

  6. ansible 小试

    安装: pip install ansible 添加配置文件: 配置文件查找顺序 * ANSIBLE_CONFIG (环境变量) * ansible.cfg (当前目录下) * .ansible.cf ...

  7. wget

    Linux wget是一个下载文件的工具,它用在命令行下.对于Linux用户是必不可少的工具,尤其对于网络管理员,经常要下载一些软件或从远程服务器恢复备份到 本地服务器.如果我们使用虚拟主机,处理这样 ...

  8. 关于datarow的状态

    发现没有添加到DataTable中的行删除则为Detached,添加之后则为Deleted.MSDN对RowState的说明 Detached 该行已被创建,但不属于任何 DataRowCollect ...

  9. oracle 中的cascade

    级联删除,比如你删除某个表的时候后面加这个关键字,会在删除这个表的同时删除和该表有关系的其他对象

  10. zx一篇让Java程序猿随时可以翻看的Oracle总结

    一篇让Java程序猿随时可以翻看的Oracle总结 前言:Oracle学习也有十几天了,但是呢,接下来还要学习许多其他的东西,并不能提步不前,所以在此总结了以下Oracle中常用的命令和语句,没有语法 ...