MySQL的安全问题从安装开始说起_Mysql

当你安装 MySQL 完后、会有个提示:

[root@localhost Desktop]# rpm -ivh MySQL-server-5.5.28-1.rhel5.i386.rpm
Preparing... ########################################### [100%]
1:MySQL-server ########################################### [100%]

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h localhost.localdomain password 'new-password'

Alternatively you can run:

/usr/bin/mysql_secure_installation

**对于这 2 种方式、我个人认为、mysql_secure_installation 比较好用***

which will also give you the option of removing the test
databases and anonymous user created by default
. This is
strongly recommended for production servers.

**我觉得、这里的关键应该是能够把匿名用户给删掉***
See the manual for more instructions.

Please report any problems with the /usr/bin/mysqlbug script!

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 installationgo a bit smoother.

You should remove them before moving into a production environment

**匿名用户的危害****

所以、生产环境请务必删之!!

我选择 mysql_secure_installation

[root@localhost Desktop]# 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.

You already have a root password set, so you can safely answer 'n'.

Change the root password? [Y/n] n
... skipping.

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] n
... skipping.

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!

Cleaning up...

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

Thanks for using MySQL!

时间: 2024-08-01 21:10:54

MySQL的安全问题从安装开始说起_Mysql的相关文章

mysql 5.7.14 安装配置代码分享_Mysql

本文记录了mysql 5.7.14 安装配置代码,具体内容如下 OS: CentOS 6.6   DB: Mysql 5.7.14   1. 下载mysql   cd /tools   wget http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.14-linux-glibc2.5-x86_64.tar.gz  2.创建MySQL二进制解压文件的目录  mkdir -p /opt/mysql [root@zw-test-db mysql]

MySQL 的模块不能安装的解决方法_Mysql

我们最常用的 DBD::mysql 模块,我发现是难住很多人的地方.因为安装老是失败,下面我介绍一下解决方法,比如我使用 cpanm 安装,有时就出 /home/nue2501j/work/DBD-mysql-4.010/blib/arch/auto/DBD/mysql/mysql.so: undefined symbol: DBIc_TRACE_LEVEL at /usr/lib/perl5/5.8.5/i386-linux-thread-multi/DynaLoader.pm line 23

mysql 5.7.14 安装配置简单教程_Mysql

记录mysql5.7.14安装与配置过程,梳理成文,希望对大家有所帮助. 1.配置文档:  ####################配置文件开始################### # For advice on how to change settings please see # http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html # *** DO NOT EDIT THIS FILE. It'

Windows 2000+Apache+MySql+PHP3+PHP4+PERL安装使用小结(转)

apache|mysql|perl|window Windows 2000+Apache+MySql+PHP3+PHP4+PERL安装使用小结www.1000script.com 2002-9-3 1000script专业脚本Windows 2000+Apache+MySql+PHP3+PHP4+PERL安装使用小结(一) 这里一定有许多和我一样喜欢尝试新鲜事物的朋友,尤其是当听说 某某软件有了新的版本时一定也会迫不及待的去下载一份回来用用再说. 这里我想和大家探讨一下以下流行软件的应用,意在抛

mysql dba系统学习(1)mysql各版本编译安装

MySQL是一个关系型数据库管理系统,由瑞典MySQL AB公司开发,目前属于Oracle公司.MySQL是一种关联数据库管理系统,关联数据库将数据保存在不同的表中,而不是将所有数据放在一个大仓库内,这样就增加了速度并提高了灵活性.MySQL的SQL语言是用于访问数据库的最常用标准化语言.MySQL软件采用了双授权政策(本词条"授权政策"),它分为社区版和商业版,由于其体积小.速度快.总体拥有成本低,尤其是开放源码这一特点,一般中小型网站的开发都选择MySQL作为网站数据库.由于其社区

CentOS6.4系统中Mysql数据库卸载、安装与配置

  就像Windows server 2003,2008中一般安装的是Sql Server 数据库,在linux系统中一般安装的是mysql数据库,而且Mysql数据库的第一个版本就是发行在Linux系统上的. 一.mysql简介 MySQL是一个关系型数据库管理系统,由瑞典MySQL AB公司开发,目前属于Oracle公司.MySQL是一种关联数据库管理系统,关联数据库将数据保存在不同的表中,而不是将所有数据放在一个大仓库内,这样就增加了速度并提高了灵活性.MySQL的SQL语言是用于访问数据

Linux下MySQL源码编译安装(eg:mysql-5.6.27.tar.gz )

Linux下MySQL源码安装(eg:mysql-5.6.27.tar.gz ): 1:准备MySQL源码安装包: mysql-5.6.27.tar.gz.cmake-3.3.2.tar.gz.ncurses-6.0.tar.gz 注:centos请安装: yum install -y ncurses-devel yum install -y perl-Module-Install.noarch 网址: https://cmake.org/download/ ftp://invisible-is

MYSQL系列1_MySQL的安装,可视化工具的使用,以及建库建表等

原文:MYSQL系列1_MySQL的安装,可视化工具的使用,以及建库建表等 大家都知道MYSQL是开源的数据库,现在MYSQL在企业中的使用也越来越多,本人之前用过SQL SERVER数据库,因业务需要和自己的兴趣想要学习MYSQL,对于MYSQL,本人还是新手,请大家多多指正. 1.安装mysql 本人安装的版本是mysql5.6 Mysql 5.6的安装包下载地址:http://pan.baidu.com/s/1o6qHG5G 安装过程比较简单,基本上是下一步下一步,安装过程中需要设置mys

mysql 5.7.13 安装配置方法图文教程(linux)_Mysql

linux环境Mysql 5.7.13安装教程分享给大家,供大家参考,具体内容如下 1系统约定 安装文件下载目录:/data/software Mysql目录安装位置:/usr/local/mysql 数据库保存位置:/data/mysql 日志保存位置:/data/log/mysql 2下载mysql 在官网:http://dev.mysql.com/downloads/mysql/ 中,选择以下版本的mysql下载: 执行如下命名: #mkdir /data/software #cd /da