加入收藏 | 设为首页 | 会员中心 | 我要投稿 核心网 (https://www.hxwgxz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程 > 正文

Oracle Linux 7.1中安置Mariadb

发布时间:2022-03-27 02:17:19 所属栏目:编程 来源:互联网
导读:在Oracle Linux 7.1中安装Mariadb 10.0.38,因为Mariadb是Mysql的分支,安装操作基本类似。 1.首先下载安装介质mariadb-10.0.38-linux-glibc_214-x86.tar.gz 并将其上传到服务器的/soft目录 2.创建用户与用户组 [root@cs1 soft]# groupadd mysql [root@cs1 s
       在Oracle Linux 7.1中安装Mariadb 10.0.38,因为Mariadb是Mysql的分支,安装操作基本类似。
 
1.首先下载安装介质mariadb-10.0.38-linux-glibc_214-x86.tar.gz 并将其上传到服务器的/soft目录
 
2.创建用户与用户组
 
    [root@cs1 soft]# groupadd mysql
  
     [root@cs1 soft]# useradd -g mysql mysql
 
3.将介质解压到/usr/local/目录下
 
     [root@cs1 soft]# cd /usr/local
 
     [root@cs1 local]# ls -lrt
 
总用量 4
 
drwxr-xr-x.  2 root root    6 5月   8 2014 src
 
drwxr-xr-x.  2 root root    6 5月   8 2014 sbin
 
drwxr-xr-x.  2 root root    6 5月   8 2014 libexec
 
drwxr-xr-x.  2 root root    6 5月   8 2014 libdrwxr-xr-x.  2 root root    6 5月   8 2014 lib
 
drwxr-xr-x.  2 root root    6 5月   8 2014 include
 
drwxr-xr-x.  2 root root    6 5月   8 2014 games
 
drwxr-xr-x.  2 root root    6 5月   8 2014 etc
 
drwxr-xr-x.  5 root root   46 10月 12 2017 share
 
drwxr-xr-x.  2 root root   46 3月   9 2018 bin
 
drwxrwxr-x  13 1021 1004 4096 1月  31 02:40 mariadb-10.0.38-linux-glibc_214-x86
 
4.创建软链接
 
[root@cs1 local]# ln -s mariadb-10.0.38-linux-glibc_214-x86 mysql
 
[root@cs1 local]# ls -lrt
 
 
5.确保目录mysql能够被用户mysql访问
 
[root@cs1 local]# cd mysql
 
[root@cs1 mysql]# chown -R mysql .
 
[root@cs1 mysql]# chgrp -R mysql .
 
6.在安装Mariadb之前,必须创建Mariadb存放数据的目录并初始化grant表,执行mysql_install_db命令来安装Mariadb,如果使用root用户来执行,必须包含--user选项来指定用户,如果是mysql用户来执行可以忽略--user选项。使用 --basedir=path 选项指定Mariadb安装目录的路径,--datadir=path选项指定Mariadb数据目录的路径。如果没有指定--basedir与--datadir选项它们在/usr/local/mysql目录下创建一个data目录。
 
[root@cs1 mysql]# scripts/mysql_install_db --user=mysql
 
Installing MariaDB/MySQL system tables in './data' ...
 
190604 14:44:44 [Note] ./bin/mysqld (mysqld 10.0.38-MariaDB) starting as process 19627 ...
 
190604 14:44:45 [Note] InnoDB: innodb_empty_free_list_algorithm has been changed to legacy because of small buffer pool size. In order to use backoff, increase buffer pool at least up to 20MB.
 
 
 
190604 14:44:45 [Note] InnoDB: Using mutexes to ref count buffer pool pages
 
190604 14:44:45 [Note] InnoDB: The InnoDB memory heap is disabled
 
190604 14:44:45 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
 
190604 14:44:45 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
 
190604 14:44:45 [Note] InnoDB: Compressed tables use zlib 1.2.11
 
190604 14:44:45 [Note] InnoDB: Using Linux native AIO
 
190604 14:44:45 [Note] InnoDB: Using CPU crc32 instructions
 
190604 14:44:45 [Note] InnoDB: Initializing buffer pool, size = 128.0M
 
190604 14:44:45 [Note] InnoDB: Completed initialization of buffer pool
 
190604 14:44:45 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
 
190604 14:44:45 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
 
190604 14:44:45 [Note] InnoDB: Database physically writes the file full: wait...
 
190604 14:44:45 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB
 
190604 14:44:45 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB
 
190604 14:44:46 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
 
190604 14:44:46 [Warning] InnoDB: New log files created, LSN=45781
 
190604 14:44:46 [Note] InnoDB: Doublewrite buffer not found: creating new
 
190604 14:44:46 [Note] InnoDB: Doublewrite buffer created
 
190604 14:44:46 [Note] InnoDB: 128 rollback segment(s) are active.
 
 
Filling help tables...
 
190604 14:44:50 [Note] ./bin/mysqld (mysqld 10.0.38-MariaDB) starting as process 19661 ...
 
190604 14:44:50 [Note] InnoDB: innodb_empty_free_list_algorithm has been changed to legacy because of small buffer pool size. In order to use backoff, increase buffer pool at least up to 20MB.
  
190604 14:44:50 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.42-84.2 started; log sequence number 1616697
 
190604 14:44:50 [Note] InnoDB: FTS optimize thread exiting.
 
190604 14:44:50 [Note] InnoDB: Starting shutdown...
 
190604 14:44:51 [Note] InnoDB: Waiting for page_cleaner to finish flushing of buffer pool
 
190604 14:44:53 [Note] InnoDB: Shutdown completed; log sequence number 1616707

(编辑:核心网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    热点阅读