MySQL 5.6 关于登陆的初始化设置
2013-03-25 11:26
176 查看
最近研究一下MySQL 5.6 版本发现安装后,使用空密码无法登陆
安装的过程中有这样的一句话:
A RANDOM PASSWORD HAS BEEN SET FOR THE MySQL root USER !
You will find that password in '/root/.mysql_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.
大概意思就是 一个随机的密码已经生成 可以在 '/root/.mysql_secret'. 中找到
第一次连接必须变更密码 且只能使用 'SET PASSWORD' 命令
在user 表中新增加了'password expired' 列,也就是密码过期
我们来启动mysql 然后登陆
service mysql start
mysql -uroot -pvssAWF0O
#密码是在 more .mysql_secret 里面记录
# The random password set for the root user at Mon Mar 25 11:13:11 2013 (local time): vssAWF0O
Warning: Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.10
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> select 1;
ERROR 1820 (HY000): You must SET PASSWORD before executing this statement
#提示必须现更改密码才能执行语句
mysql> set password=password('password2013');
Query OK, 0 rows affected (0.00 sec)
mysql> select 1;
+---+
| 1 |
+---+
| 1 |
+---+
1 row in set (0.03 sec)
mysql>
5.6版本的安全性大大增强了,其他的新特性的等待后续研究!
本文出自 “影子骑士” 博客,请务必保留此出处http://andylhz2009.blog.51cto.com/728703/1161923
安装的过程中有这样的一句话:
A RANDOM PASSWORD HAS BEEN SET FOR THE MySQL root USER !
You will find that password in '/root/.mysql_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.
大概意思就是 一个随机的密码已经生成 可以在 '/root/.mysql_secret'. 中找到
第一次连接必须变更密码 且只能使用 'SET PASSWORD' 命令
在user 表中新增加了'password expired' 列,也就是密码过期
我们来启动mysql 然后登陆
service mysql start
mysql -uroot -pvssAWF0O
#密码是在 more .mysql_secret 里面记录
# The random password set for the root user at Mon Mar 25 11:13:11 2013 (local time): vssAWF0O
Warning: Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.10
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> select 1;
ERROR 1820 (HY000): You must SET PASSWORD before executing this statement
#提示必须现更改密码才能执行语句
mysql> set password=password('password2013');
Query OK, 0 rows affected (0.00 sec)
mysql> select 1;
+---+
| 1 |
+---+
| 1 |
+---+
1 row in set (0.03 sec)
mysql>
5.6版本的安全性大大增强了,其他的新特性的等待后续研究!
本文出自 “影子骑士” 博客,请务必保留此出处http://andylhz2009.blog.51cto.com/728703/1161923
相关文章推荐
- MySQL 5.6 关于登陆的初始化设置
- 关于mysql5.6的一些设置
- 浅谈CSS3中display属性的Flex布局,关于登陆页面属性框的设置
- MySQL之MySQL:prompt 设置 -登陆MySQL显示用户名和主机以及当前数据库
- 关于从mysql中输出内容的权限设置问题
- ssh+mysql中关于大字段的设置
- #菜鸟新手EclipseJavaEE&MySQL&Tomcat#关于一个Eclipse中登陆界面通过连接MySQL数据库进行验证的小体验(感谢qq群友引燃的解答让我解决这个小问题)
- mysql 5.5和5.6版本关于timestamp插null和0的处理
- mysql 5.6及以上设置字符编码
- phpmyadmin设置登陆密码,以及修改初始化空密码
- 关于 django 的时区设置与MySQL 时间相差8小时
- centos 5.6 mysql远程访问设置(无需密码)
- 关于mysql 数据库没有 mysql库 和重启mysql后密码无法登陆 Access denied for user ''@'localhost' to database 'mysql'
- 关于在u-boot汇编中设置与初始化时钟频率的解析
- win7 64位配置mysql 5.6免安装版,初始化配置和Mysql创建新用户方法 .
- mysql 设置远程登陆以及新增用户
- 关于mysql主主同步的设置
- PAIP.MYSQL设置远程账户登陆总结
- 设置Mysql5.6允许外网访问详细流程
- 查看和设置MySQL数据库字符集(转) (默认情况下,mysql的字符集是latin1(ISO_8859_1)(注:MySQL5.6不能用此方法修改字符编码)