实验环境:

  1. centos7.3主机一台

  2. http://mariadb.org/ 下载最新源码包mariadb10.2.8

准备二进制程序

]# rz      <===上传,来自lrzsz包
]# tar xvf mariadb-10.2.8-linux-x86_64.tar.gz -C /usr/local/   <===-C 指定的路径必须是这个,源码里面定义的就是这个
]# cd /usr/local/
]# ln -s mariadb-10.2.8-linux-x86_64/ mysql

用户准备

]# useradd -r -m -d /app/mysqldb -s /sbin/nologin mysql   <===指定用户家目录为数据库存放路径/app/mysqldb

准备配置文件

]#mkdir /etc/mysql
]#cp /usr/local/mysql/support-files/my-large.cnf /etc/mysql/my.cnf
]# vim /etc/mysql/my.cnf
[mysqld]
datadir               = /app/mysqldb  <===必须要添加的
innodb_file_per_table = ON
skip_name_resolve     = ON        <===禁止主机名解析

创建数据库文件

]#cd /usr/local/mysql/
]#scripts/mysql_install_db --datadir=/app/mysqldb --user=mysql

配置环境变量

]# vi /etc/profile.d/mysql.sh
PATH=/usr/local/mysql/bin:$PATH

准备日志文件

]#mkdir /var/log/mariadb
]#chown mysql /var/log/mariadb/

准备服务脚本启动服务

]# cd /usr/local/mysql/
]# cp support-files/mysql.server /etc/init.d/mysqld
]#service mysqld start
]# ss -tanl            <===数据库监听在3306端口
State       Recv-Q Send-Q          Local Address:Port           Peer Address:Port
LISTEN      0      128                         *:22              *:*
LISTEN      0      128                        :::22              :::*
LISTEN      0      80                         :::3306            :::*

安全初始化

]# mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDBSERVERS 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):
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]
New password:
Re-enter new password:
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]  ... 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!

转载于:https://blog.51cto.com/maguofu/1971357

centos7.3二进制安装mariadb10.2.8相关推荐

  1. 二进制安装mariadb-10.2.8

    centos7.3上二进制安装mariadb-10.2.8-linux-x86_64 1.查看是否安装mariadb rpm -qa mariadb* 如果已经安装就卸载. 2.下载mariadb最新 ...

  2. 二进制安装mysql集群_实战mysql集群搭建(一)--centos7下二进制安装mysql-5.6

    在超哥的帮助下,完成了基于InnoDb数据引擎的mysql数据库集群搭建,实现了主从复制的功能,本篇博文介绍如何使用二进制安装mysql的方法,具体实现步骤如下: 软件使用说明: Liunx系统:ce ...

  3. centos7.4二进制安装mysql

    1:下载二进制安装包(安装时确保没有mysql数据库服务器端): mariadb-10.2.12-linux-x86_64.tar.gz. mariadb-10.2.12.tar.gz. 2:创建系统 ...

  4. CentOS7.3下二进制安装Kubernetes1.9集群 开启TLS

    Kubernetes的相关原理性的东西之前有叙述过,网上也有很多,这里主要是写的自己在使用二进制的方式搭建Kubernetes1.9的一些方法,对学习的东西做一个自我的总结. Kubernetes有许 ...

  5. centos7 mysql二进制_centos7+mysql5.7二进制安装

    centos7+mysql5.7二进制安装 发布时间:2020-05-20 19:38:10 来源:51CTO 阅读:2641 作者:francisxys 一.优化部分 1.操作系统参数调优 2.数据 ...

  6. centos7下MySQL的安装(通用二进制安装)

    本篇博客是为下面安装hive做准备 MySQL安装的方法有三种(这里采用通用二进制安装) (29条消息) CentOS7安装MySQL的几种方法_神圣罗马帝国的博客-CSDN博客_centos7安装m ...

  7. Centos7 二进制安装 Kubernetes 1.13

    目录 1.目录 1.1.什么是 Kubernetes? 1.2.Kubernetes 有哪些优势? 2.环境准备 2.1.网络配置 2.2.更改 HOSTNAME 2.3.配置ssh免密码登录登录 2 ...

  8. centos7 上 bosun 源码安装+go二进制安装

    1. 系统  centos 7 笔者本来直接使用的  yum 安装 go yum install go 2. 由于在拉取bosun源码的时候出错 package context: unrecogniz ...

  9. 二进制安装Mariadb

    第一个实验: 实现二进制安装mariadb 用脚本或ansible的role实现 我们先手动执行一遍,能够更好的了解其流程 第一步:将我们下载的mariadb二进制包解压 由于我们下载的是二进制的程序 ...

最新文章

  1. Oracle IMP-00403
  2. Compmgmtlauncher.exe问题解决方法
  3. linux qtcreator输入中文,新版QT creator下解决fcitx无法输入中文问题(QTcreatorV4.1.0)...
  4. 【VHDL】分频器设计要求:25分频,占空比为50%
  5. 酷我音乐android2.0,酷我音乐2012 2.0.0(For iphone)享受听歌“零“消费
  6. 在python中定义函数时不需要声明函数参数的类型_python定义函数时默认参数注意事项...
  7. Jena TDB的使用简介
  8. MATLAB程序设计与应用刘卫国(第三版)课后实验答案——12
  9. mouseover和mouseout区别
  10. win7计算机自动关机设置在哪里设置方法,win7自动关机命令是什么 怎么设置
  11. 计算机和书桌还有台灯英语,台灯的英语单词是什么
  12. 小米笔记本和手机通过蓝牙传输文件
  13. 解压chm后由hhc生成html索引页面
  14. Armadillo使用介绍(八):第二个Armadillo程序
  15. FLex 编写网页MP3播放器
  16. 软件修复硬盘物理坏道究竟靠不靠谱?效哥告诉你标准答案
  17. python简单代码演示效果-python制作演示动画
  18. npm install 报错 Failed at the XXX install script
  19. python生成试卷制卷系统_Python如何自动生成考试试卷?
  20. 剑灵系统推荐加点_劍霛2021召喚師加點推薦

热门文章

  1. VB 判断IP能否ping通
  2. ubuntu 重装系统备份数据 ubuntu安装kde桌面
  3. SCPPO(二十七):技术盛宴—报表交流会
  4. SCPPO(一):禅道的安装
  5. 不怕辣眼睛!这个机器人用脸来摘辣椒
  6. 红芯事件追踪:官方致歉承认基于开源架构;创始人履历被指夸大
  7. 刻不容缓!联合国加开会议讨论「如何限制杀人机器人」
  8. VMware虚拟机环境下配置centos的固定IP并用xshell连接
  9. effective java 第2条:遇到多个构造器参数时要考虑用构造器
  10. 微信小程序第三方平台和附近的小程序将开放