centos7安装配置MariaDB10
1:添加 MariaDB yum 仓库
vi /etc/yum.repos.d/MariaDB.repo
在该文件中添加以下内容保存:
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.2/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=
2:安装 MariaDB
yum install MariaDB-server MariaDB-client -y
(1)安装完毕后,立即启动数据库服务守护进程。
systemctl start mariadb
(2)设置 MariaDB 在操作系统重启后自动启动服务
systemctl enable mariadb
(3)查看 MariaDB 服务当前状态
systemctl status mariadb
3:对 MariaDB 进行安全配置
设置 MariaDB 的 root 账户密码,删除匿名用户,禁用 root 远程登录,删除测试数据库,重新加载权限表。
mysql_secure_installation Set root password? [Y/n] Y
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] 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:基本配置
(1)设置数据库字母大小写不敏感
vi /etc/my.cnf.d/server.cnf 在[mysqld]下加上】
lower_case_table_names=
(2)设置MariaDB数据库默认编码
vi /etc/my.cnf.d/client.cnf
在[client]字段里加入
default-character-set=utf8 vi /etc/my.cnf.d/server.cnf
在[mysqld]字段里加入
character-set-server=utf8
(3)修改默认端口号3306修改为3366
vi /etc/my.cnf.d/client.cnf
在[client]字段修改
port= vi /etc/my.cnf.d/server.cnf
在[mysqld]字段里加入
port=
(4)修改最大连接数
vi /etc/my.cnf.d/server.cnf
[mysqld] 下面增加下面配置:
max_connections= 查看最大连接数
show variables like '%max_connections%';
(5)修改max_allowed_packet
vi /etc/my.cnf.d/server.cnf
[mysqld] 下面增加下面配置:
max_allowed_packet=16M
5:最后重启 MariaDB 配置生效
systemctl restart mariadb
centos7安装配置MariaDB10的更多相关文章
- Centos7安装配置gitlab
Centos7安装配置gitlab 这篇文字我会介绍在Centos7上安装gitlab,配置gitlab的smtp,并且创建项目demo. sudo yum install openssh-serve ...
- Centos7安装配置Apache+PHP+Mysql+phpmyadmin
转载自: Centos7安装配置Apache+PHP+Mysql+phpmyadmin 一.安装Apache yum install httpd 安装成功后,Apache操作命令: systemctl ...
- Centos7安装配置JDK8
Centos7安装配置JDK8 一.准备工作 第一步,去甲骨文官网下载Jdk相应的版本,我这里下载的是jdk1.8. 第二步将你从官网上下载下来的jdk使用FTP工具上传到云服务器上的相应目录,我的是 ...
- centos7命令行和图形界面的相互切换(附centos7安装配置教程)
一.最近安装了centos7,发现在命令行和图形界面的相互切换命令上,与centos以往版本有很大不同,先整理如下,加深记忆. 1,centos7默认安装后,跟其他版本一样,启动默认进入图形界面: 2 ...
- (转)Centos7安装配置NFS服务和挂载
Centos7安装配置NFS服务和挂载 原文:https://www.u22e.com/601.html NFS简介 NFS(Network File System)即网络文件系统,是FreeBSD支 ...
- CentOS7 安装配置笔记
CentOS7 安装配置笔记 1.通过镜像安装 CentOS7 ==============================* 使用 UltraISO 9.7 或者 rufus-3.5p 制作ISO的 ...
- Centos7安装配置jenkins(Tomcat)
Centos7安装配置jenkins(Tomcat) 一.准备工作 1.1 安装JDK1.8 具体安装过程不在赘述. 1.2 下载jenkins的war包 jenkins官网下载地址:https:// ...
- CentOS7 安装配置rsync
centos7自带rsync,今天简单记录下. rsync安装配置步骤 服务器端: 1.修改默认配置文件/etc/rsyncd.conf,该成如下: # /etc/rsyncd: configurat ...
- centos7安装配置zabbix4.0
zabbix01 198.8.8.211 zabbix-server4.0 zabbix02 198.8.8.212 zabbix-agent4.0 一:zabbix服务端环境 ...
随机推荐
- web万维网 -- 基础概念
Web(万维网World Wide Web的简称)是个包罗万象的万花筒,不同的人从不同的角度观察,对于Web究竟是什么会得出大不相同的观点. 百科:web(World Wide Web)即全球广域网, ...
- react native开源库管理
安装: 1,正确的安装方式是 npm install xxx --save,经常看到许多组件安装文档上后面没有 --save,如果没有建议加上 否则组件信息不会出现在package.json中,导入组 ...
- UFUN函数 UF_CSYS UF_MODL UF_OBJ函数(建模注意坐标系);
//用到的函数 //UF_MODL_create_block1 ,UF_MODL_ask_feat_body,UF_OBJ_set_name,UF_CSYS_map_point UF_initiali ...
- 程序自动分析(NOI2015)(洛谷P1955)题解
原题: 在实现程序自动分析的过程中,常常需要判定一些约束条件是否能被同时满足. 考虑一个约束满足问题的简化版本:假设x1,x2,x3...代表程序中出现的变量,给定n个形如xi=xj或xi≠xj的变量 ...
- 自制Amiibo 踩坑/填坑 指南
去年买了台老版NS,后来得知有Amiibo这种东西的存在,但是学校附近都买不到. 再后来网上看见有人在X宝卖自制卡片,就寻思着是否能自己 DIY一套,于是掉坑里. 要想使用自制Amiibo,一共要做两 ...
- <转>python列表、元组、集合、字典、json相互转换以及其他基础入门
列表元组转其他 # 列表转集合(去重) list1 = [6, 7, 7, 8, 8, 9] set(list1) # {6, 7, 8, 9} #两个列表转字典 list1 = ['key1','k ...
- mysql 全连接和 oracle 全连接查询、区别
oracle的全连接查询可以直接用full on,但是在mysql中没有full join,mysql使用union实现全连接. oracle的全连接 select * from a full joi ...
- SpringCloud:学习Gateway网关拦截器的ServerWebExchange
1.Gateway的拦截器 我们要在项目中实现一个拦截器,需要继承两个类:GlobalFilter, Ordered GlobalFilter:全局过滤拦截器,在gateway中已经有部分实现,具体参 ...
- 保存tensor至本地文件
path_temp = '../m39_data/temp3' #文件目录 file_name = os.path.join(path_temp, "setQ.txt") Q = ...
- nginx之allow、deny
allow和deny这两个指令的意思是指,允许ip和限制ip 在此之前不得不提一下,这两个指令是存在于ngx_http_access_module模块之中的 allow语法:allow address ...