mysql_secure_installation

[[email protected] soft]# mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MySQL to secure it, we‘ll need the current
password for the root user.  If you‘ve just installed MySQL, 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 MySQL
root user without the proper authorisation.

Set root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
 ... Success!

By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL 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, MySQL 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
 ... 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!

All done!  If you‘ve completed all of the above steps, your MySQL
installation should now be secure.

Thanks for using MySQL!

Cleaning up...
时间: 2024-11-05 23:36:32

mysql_secure_installation的相关文章

Mac Mysql mysql_secure_installation Error: Access denied for user 'root'@'localhost' (using password: YES)

mysql由brew安装, 期间好像自动更新了一次 然后再次执行mysql_secure_installation, 输入root密码后报错, 重装mysql还是不行 Error: Access denied for user 'root'@'localhost' (using password: YES) 原因是之前安装的mysql配置文件没有彻底清除 参照 http://stackoverflow.com/questions/4359131/brew-install-mysql-on-mac

MySQL安全配置向导mysql_secure_installation详解

安装完mysql-server 会提示可以运行mysql_secure_installation.运行mysql_secure_installation会执行几个设置:  a)为root用户设置密码  b)删除匿名账号  c)取消root用户远程登录  d)删除test库和对test库的访问权限  e)刷新授权表使修改生效 通过这几项的设置能够提高mysql库的安全.建议生产环境中mysql安装这完成后一定要运行一次mysql_secure_installation,详细步骤请参看下面的命令:

安装MariaDB phpMyAdmin

1 安装设置MariaDB5.5 [[email protected] ~]# yum -y install mariadb-server [[email protected] ~]# vi /etc/my.cnf [mysqld] character-set-server=utf8 [[email protected] ~]# systemctl enable  mariadb.service[[email protected] ~]# systemctl start  mariadb.ser

阿里云服务器 ECS 部署lamp:centos+apache+mysql+php安装配置方法 (centos7)

1.效果图 1 2. 部署步骤 1 1. mysql安装附加(centos7) 7 3.错误注意****** 10 1.效果图 2.部署步骤 链接 http://jingyan.baidu.com/article/870c6fc31218e8b03fe4be16.html 首先安装apachecentos可以直接yum安装apache ?. 命令:yum install httpd ? //根据提示,输入Y安装即可成功安装? 然后启动apache,并且设置系统让?Apache 开机自动启动. 命

(转)625某电商网站数据库宕机故障解决实录(下)

1.4开始进行故障恢复***** 1.重新初始化建库 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 [[email protected] data]# mkdir mysql [[email protected] data]# chown -R mysql.mysql mysql [ro[email protected] data]# /install/mysql/sc

lnmp平台的简单基础搭建

一.mysql的安装: 1. get mysql-boost-5.7.17.tar.gz (from 老吴) 使用mysql-boost-5.7.17.tar.gz时,查看df -h,物理空间应该大于10G tar zxf mysql-boost-5.7.17.tar.gz##解压mysql,会发现解压完后du -sh是500+M 2. 软件包依赖性: 在cmake过程中需要使用到gcc.gcc-c++编译器.ncurses-devel.cmake yum install -y gcc gcc-

Owncloud安装配置

1.更改yum源mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backupwget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repoyum clean allyum makecachesetenforce 0systemctl stop firewalldsystemctl disable

Oenstak(M版)控制节点安装

#############修改hosts文件 # controller10.0.0.11 controller# compute110.0.0.31 compute1# block110.0.0.41 block1# object110.0.0.51 object1# object210.0.0.52 object2 #############关闭selinux及防火墙############# systemctl stop firewalldsystemctl disable firewall

CentOS 6.6编译安装LAMP(Apache2+PHP+Mysql+PHPmyAdmin)

搭建好开发环境: Linux: CentOS 6.6(Final) x64 Apache:2.2.15 MySQL:5.1.52 PHP:5.3.2 步骤说明: 1.MySQL # yum install mysql mysql-server # chkconfig --levels 235 mysqld on # MySQL 可以随系统自己主动启动 # /etc/init.d/mysqld start # mysql_secure_installation # 设置 MySQL 数据 root