加固mysql服务器
实验环境:CentOS7
[root@~ localhost]#yum -y install mariadb-server
[root@~ localhost]#mysql_secure_installation #数据库安全加固 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): #默认密码为空,故只按回车键!密码为空不安全,需要首先设置
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 #是否设置root的登录密码: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 #是否移除anonymous用户
... 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 #是否不允许root的远程登录
... 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] n #是否移除test数据库,并禁止访问
... skipping. 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!
加固mysql服务器的更多相关文章
- 闰秒导致MySQL服务器的CPU sys过高
今天,有个哥们碰到一个问题,他有一个从库,只要是启动MySQL,CPU使用率就非常高,其中sys占比也比较高,具体可见下图. 注意:他的生产环境是物理机,单个CPU,4个Core. 于是,他抓取了CP ...
- 如何配置远程mysql服务器
如何配置远程mysql服务器 分配用户权限 可以先看一下目前的用户权限状况: use mysql; select host,user,password from user; 然后分配新的权限给某一用户 ...
- MYSQL服务器my.cnf配置文档详解
MYSQL服务器my.cnf配置文档详解 硬件:内存16G [client] port = 3306 socket = /data/3306/mysql.sock [mysql] no-auto-re ...
- mysql服务器和配置优化
一.存储引擎 mysql中有多种存储引擎,一般常见的有三种: MyIsam InnoDB Memory 用途 快读 完整的事务支持 内存数据 锁 全表锁定 多种隔离级别的行锁 全表锁定 持久性 基 ...
- 远程连接mysql数据库时报错: 错误代码 2003不能连接到MySQL服务器在*.*.*.*(111)
在测试服务器上安装完mysql后, 服务器自己访问没有问题, 但是本地通过sql客户端连接时报错: 错误代码 2003不能连接到MySQL服务器在*.*.*.*(111).在网上查了一些资料,解决方案 ...
- 登录phpmyadmin提示: #1045 无法登录 MySQL 服务器
打开phpmyadmin,进行登录,出现以下问题,提示:#1045 无法登录 MySQL 服务器 或许出现以下错误情况:phpmyadmin:#1045 无法登录 MySQL 服务器.Access d ...
- 如何将自己的windows设置为mysql服务器
1.安装mysql 服务器 2.创建超级用户,即 用户管理 mysql>use mysql; 查看 mysql> select host,user,password from user ; ...
- 一台MySQL服务器启动多个端口
一台MySQL服务器启动多个端口 在测试Mysql多主一从服务器,即一个从服务器多端口同步不同主库.本文记录了开启不同端口的操作. 详细步骤: 1.首先要先把my.cnf配置文件复制一份,开几个端口要 ...
- 详解 Spotlight on MySQL监控MySQL服务器
前一章详解了Spotlight on Unix 监控Linux服务器 ,今天再来看看Spotlight on MySQL怎么监控MySQL服务器. 注:http://www.cnblogs.com/J ...
随机推荐
- 我的Android进阶之旅------> Android应用升级构想和要点总结
广大博友,看过后帮忙顶顶,谢谢大家!!! 转载请注明: http://blog.csdn.net/richway2010/article/details/6408258 [博主:各位博友,网友们,大家 ...
- c/c++ 输入输出技巧
C: 小数的四舍五入问题 小数用 %.xf 输出的话 是会自动四舍五入的 比如说 double e = 2.718, c = 3.141; printf("%.2lf\n", e) ...
- 每天一个Linux命令(34)grep命令
grep(global search regular expression(RE) and print out the line,全面搜索正则表达式并把行打印出来)是一种强大的文本搜索工具 ...
- HDU 1533 Going home
Going Home Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total ...
- 算法(Algorithms)第4版 练习 1.4.5
a. N b. 1 c. 1 d. N3 e. 1 f. 1 g. 1(0)
- Java -- 容器使用 Set, List, Map, Queue, Collections
1. ArrayList ArrayList<String> c = new ArrayList<String>(); c.add("hello"); c. ...
- C语言中的位操作(15)--确定log10(N)的整数部分
本篇文章介绍一个整数的以10为底的对数的整数部分,即对于整数N,求log10(N)整数部分 方法一 : unsigned int v; //32位非0整数 int r; // r保存结果 int t; ...
- CDH- 集群时间同步ntp问题解决
在CDH集群中发现有两台机器获取不到心跳(),导致监控不了机器状态,出现告警 可以使用ntpstat检查与ntp 服务器的时间偏差状态 使用 ntpstat 发现没有同步到ntp时间服务器,运行 nt ...
- delphi完美经典-第16章 Delphi数据库程序设计----使用BDE组件
第16章 Delphi数据库程序设计----使用BDE组件 Delphi访问数据库的方式有:ADO.BDE.dbExpress.InterBase Express. 一.TDataSet组件 虽然De ...
- jQuery与javascript库
[jquery-javascript库] 为了简化javascript的开发,诞生了javascript程序库,他封装了很多预定的对象和实用函数.下面是几种流行的javascript程序库:proto ...