实验环境: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服务器的更多相关文章

  1. 闰秒导致MySQL服务器的CPU sys过高

    今天,有个哥们碰到一个问题,他有一个从库,只要是启动MySQL,CPU使用率就非常高,其中sys占比也比较高,具体可见下图. 注意:他的生产环境是物理机,单个CPU,4个Core. 于是,他抓取了CP ...

  2. 如何配置远程mysql服务器

    如何配置远程mysql服务器 分配用户权限 可以先看一下目前的用户权限状况: use mysql; select host,user,password from user; 然后分配新的权限给某一用户 ...

  3. MYSQL服务器my.cnf配置文档详解

    MYSQL服务器my.cnf配置文档详解 硬件:内存16G [client] port = 3306 socket = /data/3306/mysql.sock [mysql] no-auto-re ...

  4. mysql服务器和配置优化

    一.存储引擎 mysql中有多种存储引擎,一般常见的有三种:   MyIsam InnoDB Memory 用途 快读 完整的事务支持 内存数据 锁 全表锁定 多种隔离级别的行锁 全表锁定 持久性 基 ...

  5. 远程连接mysql数据库时报错: 错误代码 2003不能连接到MySQL服务器在*.*.*.*(111)

    在测试服务器上安装完mysql后, 服务器自己访问没有问题, 但是本地通过sql客户端连接时报错: 错误代码 2003不能连接到MySQL服务器在*.*.*.*(111).在网上查了一些资料,解决方案 ...

  6. 登录phpmyadmin提示: #1045 无法登录 MySQL 服务器

    打开phpmyadmin,进行登录,出现以下问题,提示:#1045 无法登录 MySQL 服务器 或许出现以下错误情况:phpmyadmin:#1045 无法登录 MySQL 服务器.Access d ...

  7. 如何将自己的windows设置为mysql服务器

    1.安装mysql 服务器 2.创建超级用户,即 用户管理 mysql>use mysql; 查看 mysql> select host,user,password from user ; ...

  8. 一台MySQL服务器启动多个端口

    一台MySQL服务器启动多个端口 在测试Mysql多主一从服务器,即一个从服务器多端口同步不同主库.本文记录了开启不同端口的操作. 详细步骤: 1.首先要先把my.cnf配置文件复制一份,开几个端口要 ...

  9. 详解 Spotlight on MySQL监控MySQL服务器

    前一章详解了Spotlight on Unix 监控Linux服务器 ,今天再来看看Spotlight on MySQL怎么监控MySQL服务器. 注:http://www.cnblogs.com/J ...

随机推荐

  1. centos6安装nginx最详细步骤

    第一步:在centos下面下载 nginx          wget http://nginx.org/download/nginx-1.2.9.tar.gz 解压 tar zxf nginx-1. ...

  2. ABAP xml

    [转]Part 1 - Expressiveness of Simple TransformationsSimple Transformations are a SAP proprietary pro ...

  3. Django模型系统——ORM表结构对应关系

    对于数据库来说一般表结构只会有三种对应关系,分别是一对一.一对多和多对一,下面分别介绍: 1.一对多 何为一对多,例如一个学生只可能有一个班级,一个班级却又多个学生,班级表和学生表就是一对多的关系. ...

  4. LeetCode:零钱兑换【322】【DP】

    LeetCode:零钱兑换[322][DP] 题目描述 给定不同面额的硬币 coins 和一个总金额 amount.编写一个函数来计算可以凑成总金额所需的最少的硬币个数.如果没有任何一种硬币组合能组成 ...

  5. mapreduce源码解析以及优化

    http://blog.csdn.net/wisgood/article/details/8793483 优化 http://blog.csdn.net/wisgood/article/details ...

  6. linux下tomcat的配置及项目的部署流程

    Java的安装配置 1. 在/etc/profile文件中配置相应的信息(如下) export JAVA_HOME=/usr/java/jdk1.6.0_20 export JRE_HOME=/usr ...

  7. Eclipse cdt mingw配置记录

    本人下载的是Eclipse C/C++ IDE for Neon.3,下载页面是:http://www.eclipse.org/cdt/downloads.php. 1. 运行eclipse后,在He ...

  8. 【Flask】Sqlalchemy 常用数据类型

    ### SQLAlchemy常用数据类型:1. Integer:整形,映射到数据库中是int类型.2. Float:浮点类型,映射到数据库中是float类型.他占据的32位.3. Double:双精度 ...

  9. hbase shell-dml(数据管理指令)

    hbase shell数据管理篇: append count delete deleteall get get_counter get_splits incr put scan truncate tr ...

  10. Hadoop- Hadoop运维小计

    如果是新添加一个节点,需要执行以下步骤: 首先,把新节点的 IP或主机名 加入主节点(master)的 conf/slaves 文件. 然后登录新的从节点,执行以下命令: $ cd Hadoop_pa ...