安装在CloudStack时CentOS6.4中安装MySQL通过mysql_secure_installation方式修改密码

摘要:
0405为了登录MySQL以确保安全,我们需要其他用户的当前密码。如果您刚刚安装了MySQL,07您还没有设置其他密码,则密码将为空,08您只需按此处输入即可。0910输入root用户的当前密码:1516Setrotpassword?[Y/n]Y˂---是否设置根密码。当然是。输入Y并输入17Newpassword:˂---输入根密码并输入。在输入过程中,不会显示18Re internewpassword:˂---再次输入根密码并输入。在输入过程中,不会成功显示19Passwordupdated![Y/n]Y˂---是否要删除并禁止根用户的远程登录?当然,这是被禁止的。输入Y输入36…成功![Y/n]˂---是否删除测试数据库,删除它,输入Y并输入43 Droppingtestdatabase…44…成功![Y/n]Y˂---刷新权限,输入Y以输入52…成功!

在安装CloudStack时,通过mysql_secure_installation方式修改密码

01 [root@test ~]# /usr/bin/mysql_secure_installation
02 NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
03 SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
04
05 In order to log into MySQL to secure it, we'll need the current
06 password for the root user. If you've just installed MySQL, and
07 you haven't set the root password yet, the password will be blank,
08 so you should just press enter here.
09
10 Enter current password for root (enter for none):<---输入现在的root密码,因为我们还没设置,直接回车
11 OK, successfully used password, moving on...
12
13 Setting the root password ensures that nobody can log into the MySQL
14 root user without the proper authorisation.
15
16 Set root password? [Y/n] Y <---是否设定root密码,当然设置了,输入Y回车
17 New password: <---输入root密码,并回车,输入的过程中不会有任何显示
18 Re-enter new password: <---再次输入root密码,并回车,输入的过程中不会有任何显示
19 Password updated successfully!
20 Reloading privilege tables..
21 ... Success!
22
23 By default, a MySQL installation has an anonymous user, allowing anyone
24 to log into MySQL without having to have a user account created for
25 them. This is intended only for testing, and to make the installation
26 go a bit smoother. You should remove them before moving into a
27 production environment.
28
29 Remove anonymous users? [Y/n] Y <---是否删除匿名用户,删除,输入Y回车
30 ... Success!
31
32 Normally, root should only be allowed to connect from 'localhost'. This
33 ensures that someone cannot guess at the root password from the network.
34
35 Disallow root login remotely? [Y/n] Y <---是否删禁止root用户远程登录,当然禁止,输入Y回车
36 ... Success!
37
38 By default, MySQL comes with a database named 'test' that anyone can
39 access. This is also intended only for testing, and should be removed
40 before moving into a production environment.
41
42 Remove test database and access to it? [Y/n] <---是否删除测试数据库test,删除,输入Y回车
43 - Dropping test database...
44 ... Success!
45 - Removing privileges on test database...
46 ... Success!
47
48 Reloading the privilege tables will ensure that all changes made so far
49 will take effect immediately.
50
51 Reload privilege tables now? [Y/n] Y <---刷新权限,输入Y回车
52 ... Success!
53
54 Cleaning up...
55
56 All done! If you've completed all of the above steps, your MySQL
57 installation should now be secure.
58
59 Thanks for using MySQL! 

转载请注明:www.xujin.org或www.virgocloud.com

免责声明:文章转载自《安装在CloudStack时CentOS6.4中安装MySQL通过mysql_secure_installation方式修改密码》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇redis 的操作小程序app.onLaunch中获取用户信息,index.onLoad初次载入时取不到值的问题下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

MySQL快速回顾:计算字段与函数

9.1 计算字段 存储在数据库表中的数据一般不是应用程序所需要的格式。比如: 如果想要在一个字段中既显示公司名,又显示公式的地址,但这两个信息一般包含在不同的表列中。 城市、州和邮政编码存储在不同的列中,但邮件标签打印程序却需要把它们作为一个恰当格式的字段检索出来。 列数据是大小写混合的,但报表程序需要把所有数据按大写表示出来。 在上面举的例子中,存储...

详述一次大量删除导致MySQL慢查的分析

墨墨导读:监控上收到了大量慢查的告警,业务也反馈查询很慢,本文记录整个慢查的原因,以及解决方案。 一、背景监控上收到了大量慢查的告警,业务也反馈查询很慢,随即打开电脑确认慢查的原因。 二、现象描述通过平台的慢查分析之后,我们发现慢查有以下特征: 慢查的表名都是 sbtest1,没有其他的表; 大部分的慢查都是查表最新的数据,例如 select * f...

[Deepin 15] 编译安装 MySQL-5.6.35

在 Ubuntu 下,先前一直是 二进制包解压安装,详情参考: http://www.cnblogs.com/52php/p/5680906.html 现改为 源码编译安装: #!/bin/bash # 安装 依赖库 sudo apt-get -y install make cmake gcc g++ bison openssl libssl-de...

sklearn中的数据集的划分

sklearn数据集划分方法有如下方法: KFold,GroupKFold,StratifiedKFold,LeaveOneGroupOut,LeavePGroupsOut,LeaveOneOut,LeavePOut,ShuffleSplit,GroupShuffleSplit,StratifiedShuffleSplit,PredefinedSplit,...

Qt C++中的关键字explicit——防止隐式转换(也就是Java里的装箱),必须写清楚

最近在复习QT,准备做项目了,QT Creator 默认生成的代码 explicit Dialog(QWidget *parent = 0)中,有这么一个关键字explicit,用来修饰构造函数。以前在Windows下写程序的时候,基本上没有碰到这个关键字,那么这个关键字是做什么用的呢? 关键字 explicit 可以禁止“单参数构造函数”被用于自动类型转...

Mysql大并发热点行更新的两个骚操作

要想db操作的性能足够高,巧妙的设计很重要,事务的操作范围要尽量的小。一般情况下我们都是使用某个orm框架来操作db,这一类框架多数的实现方式都是夸网络多次交互来开启事务上下文和执行sql操作,是个黑盒子,包括对 autocommit 设置的时机也会有一些差异,稍微不注意就会踩坑。 在大并发的情况下加上夸网络多次交互,就不可避免的由于网络延迟、丢包等原因导...