当你安装 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 hasan 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!

mysql 安装 安全错误_MySQL的安全问题从安装开始说起相关推荐

  1. mysql 报1055错误_MySQL数据库报1055错误

    有点坑啊,当初装MySQL数据库的时候没有整配置文件,结果MySQL报1055错误的时候,网上的解决办法都说如果需要永久生效的话,只能通过改配置文件实现,but,我没有配置文件,蜜汁尴尬啊 1.已安装 ...

  2. 新安装的mysql登录不了_mysql 5.6 新安装登录

    mysql 5.6提高了安全性,默认安装完之后,不允许空密码登录,而是在/root/.mysql_secret,记录了密码,所以首次登录,必须用这个文件里面的密码登录 [root@nagios ~]# ...

  3. mysql下载安装及配置_mysql的下载,安装和配置

    顺道向大家介绍一下mysql的安装和配置,mysql数据库应该说是现在整个互联网行业最流行的数据库了,简单易用 1.下载,大家可以去官网下载最新的mysql版本,地址:http://dev.mysql ...

  4. mysql64位机安装和配置_MySQL学习第二天 安装和配置mysql winx64

    一.安装方式 MySQL安装文件分为两种,一种是MSI格式的,一种是ZIP格式的.下面来看看这两种方式: MSI格式的可以直接点击安装,按照它给出的安装提示进行安装,Windows操作系统下一般MyS ...

  5. macos安装更新错误_如何控制何时安装macOS更新

    macos安装更新错误 Updates are necessary, but annoying. Which is why your Mac, by default, installs them au ...

  6. Linux安装库时安装源错误,linux环境下golang安装第三方库的时候出错的决办法

    1.错误描述 使用如下方式安装beego的时候出错 go get github.com/astaxie/beego 错误信息: go install unicode/utf8: open /opt/g ...

  7. mysql yum安装与配置文件_MySQL 8.0 yum安装和配置

    MySQL 8.0 centos7.5 x86_64 一.yum安装 1.先卸载机器和mysql有关的东西,有的安装了mariab-lib,会对安装有干扰,卸载了它. [root@localhost ...

  8. mysql 数据库第二次安装不了_mysql数据库二次安装无法启动

    Starting MySQL...... ERROR! Manager of pid-file quit without updating file. 可选拍错思路: my.cnf 配置文件参数错误. ...

  9. mysql 远程 2003错误_MySQL远程连接失败(错误码:2003)

    注:本文来源于< MySQL远程连接失败(错误码:2003)> (1) Xshell远程登陆服务器,用"ps aux|grep mysql"命令查看,MySQL服务已启 ...

最新文章

  1. HDU 6185 Covering 矩阵快速幂 递推
  2. Java基础学习总结(28)——Java对各种排序算法的实现
  3. 【JavaEE企业应用实战学习记录】struts配置文件详细解析
  4. Django项目:CRM(客户关系管理系统)--12--05PerfectCRM实现King_admin注册功能获取内存01...
  5. java $和$$的区别_Java #{}和${}区别
  6. linux安装 tomcat 6 笔记
  7. UIView动画---移动与变形
  8. PCIe device tree range属性详解
  9. 野蛮愚昧的词过滤,咱是技术网站吗?
  10. Java多线程之同步与阻塞队列
  11. 数据分析师市场需求研究
  12. 盒子不显示工会与服务器,DNF天空盒子找不到怎么办 dnf新版本活动防坑指攻略...
  13. 服务器蓝屏显示3b,完美解决0x0000003B蓝屏故障的方法
  14. 基于注意力对抗生成网络的AlphaFold从氨基酸序列建立三维蛋白质结构
  15. 尚硅谷MySQL基础学习笔记
  16. BC26低功耗的OPENCPU代码注意事项
  17. 网站被黑 怎么检测代码含有后门
  18. 股票爆仓应该具体怎么办呢?股票爆仓常见的危险是什么?
  19. LeetCode之报数(简单 模拟 递归)
  20. 十进制转32位二进制(Java)

热门文章

  1. Spring常见的十八中异常Exception
  2. HTML5--表单标签input新增type值
  3. hdu1846巴什博弈(java)
  4. python编程实战(二):一文教你生成随机验证码!大小写字母与数字组合,位数可以控制
  5. Hadoop 核心编程之 HDFS 的文件操作
  6. shiro与springMVC整合
  7. 自动添加html结束标志,XHTML标签都有一个结束标记
  8. html background缩放,background-size使用详解
  9. 网工路由基础(4)EIGRP协议
  10. python添加模块路径_(转)为Python添加默认模块搜索路径