2/40
A RANDOM PASSWORD HAS BEEN SET FOR THE MySQL root USER !
You will find that password in '/root/.mysql_secret'.
一个随机性的密码已经为mysql的root 用户设置好了,你可以在root家目录下的.msyql_secret中看到这个密码,这个是mysql 5.5版本之后新出
现的一个特性,mysql 5.5之前的版本在安装完之后,有一个非常重要的安全性隐患就是mysql 管理用户和mysql root用户是空密码,所以对于
一个刚刚安装完成之后的mysql服务器来说,任何人可以从任何地方使用空密码直接访问数据库,这是一个很不安全的事情,因此在5.5.以后
在mysql安装完之后会随机性的为root用户随机设置一个密码并且把它保存在root家目录下的.msyql_secret文件中
You must change that password on your first connect,
no other statement but 'SET PASSWORD' will be accepted.
See the manual for the semantics of the 'password expired' flag.
你必须在你第一次连接mysql的时候重设这个密码。别的都干不了,但是'SET PASSWORD这个命令是可以执行的,可以去看相应的手册,比
如 password expired部分的介绍
Also, the account for the anonymous user has been removed.
In addition, you can run:
/usr/bin/mysql_secure_installation
which will also give you the option of removing the test database.
This is strongly recommended for production servers.
See the manual for more instructions.
这里提到了一个工具叫做mysql_secure_installation叫安全的安装,这个安装其实提供了几个功能,让我们在初次安装MySQL之后呢,提供一
些安装上面的修改,建议大家在安装完毕之后使用,后面还有一些介绍,可以去mysql官方网站去看它的手册,还可以去shop.mysql.com买它
的商品,等等。
Please report any problems at http://bugs.mysql.com/
The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
New default config file was created as /usr/my.cnf and
will be used by default by the server when you start it.
You may edit this file to change server settings
首先想要去操作mysql的时候,需要知道它给我们设置的随机密码是什么。我们来看一下
[root@zyg tmp]# cd
[root@zyg ~]# ls .mysql_secret
.mysql_secret
[root@zyg ~]# cat .mysql_secret
# The random password set for the root user at Mon Dec 8 01:47:25 2014 (local time): T9YV_AZe_HIZoQ5z
.mysql_secret这个文件里面写了随机性的密码。要连接mysql,就需要把这些随机密码输入进去。
不过先不着急,先运行一下mysql_secure_installation这个命令,建议在第一次安装完成之后先运行这个命令,如果你没有运行mysql的话,当
然无法对它进行一些安装方面的设置和操作。先把mysql这个服务启动起来。
[root@zyg ~]# service mysql start
Starting MySQL. [ OK ]
评论