DBA-mysql-init-password-5.7
1.Mysql5.7 Password;
查找临时密码:grep "A temporary password" /var/log/mysqld.log
修改临时密码:alter user root@'localhost' identified by '!QAZ2wsx';# ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
查看密码策略:SHOW VARIABLES LIKE 'validate_password%';

查看密码插件: show plugins;配置文件[mysqld]标签中添加 validate_passwor=off

注意:5.7后,MySQL的 mysql.user 表中的密码字段由之前的 password 改为 authentication_string
经验:所以在数据从5.x迁移到5.7后,需要做更新mysql操作: mysql_upgrade -uroot -p
无临时密码方法:
无密码启动:mysqld_safe --skip-grant-tables &
查看密码:select user,host,authentication_string,password_expired from user;
重设密码 update user set authentication_string=password('123abc') where user='root'; flush privileges;
修改MySQL密码方式:
法1:update user set authentication_string=password('123abc') where user='root';
法2:set password=password('newpassword');
法3:alter user root@'localhost' identified by 'oracle';
法4:在shell下使用MySQL工具:mysqladmin -uroot -poldpassword pasword "newpassword"
DBA-mysql-init-password-5.7的更多相关文章
- mysql init password centos
https://www.cnblogs.com/FlyingPuPu/p/7783735.html
- Linux - Reset a MySQL root password
Use the following steps to reset a MySQL root password by using the command line interface. Stop the ...
- windows下解决mysql忘记password
windows下解决mysql忘记password mysql有时候忘记password了怎么办?我给出案例和说明!一下就攻克了! Windows下的实际操作例如以下 1.关闭正在执行 ...
- linux上MySQL改动password的各种方法,yc整理
MySQL改动password的各种方法 整理了下面四种在MySQL中改动rootpassword的方法,可能对大家有所帮助! 方法1: 用SET PASSWORD命令 mysql -uroot my ...
- mysql忘记password
有时候突然忘记MySQL的password会真的不爽,这里介绍一种MySQLpassword忘记时重置password的方法,操作系统win8,MySql version:5.6.10 1 在任务管理 ...
- Go -- this user requires mysql native password authentication 错误
this user requires mysql native password authentication 在连接mysql的url上加上?allowNativePasswords=true,这次 ...
- mysql的password()函数和md5函数
password用于修改mysql的用户密码,如果是应用与web程序建议使用md5()函数, password函数旧版16位,新版41位,可用select length(password('12345 ...
- Mysql re-set password, mysql set encode utf8 mysql重置密码,mysql设置存储编码格式
There is a link about how to re-set password. http://database.51cto.com/art/201010/229528.htm words ...
- mysql "Your password has expired...."错误解决方案
mysql -u root -p 进入mysql命令界面,然后输入 set password = password("新密码"); 参考:http://blog.csdn.net/ ...
- mysql user password plugin
caching_sha2_passwordcaching_sha2_passwordcaching_sha2_passwordcaching_sha2_passwordcaching_sha2_pas ...
随机推荐
- css2----兼容----ie67的3像素bug
发生条件:当浮动元素和非浮动元素相邻 时候,ie67下,两个元素就会多出3像素的间隔,其实是浮动元素产生的margin值 解决办法:1:让没有浮动的元素也浮动: 2:让浮动元素产生margin-*:- ...
- UITableView去掉section的header的粘性
思路:若header的高度为25,在滑动的时候将scrollView的内容偏移量上衣25,其实他还是粘在上面只不过我们看不到他了. ///---用于判断往上滑还是往下滑 var deltaY:CGFl ...
- github的使用步骤及体会
对于github的readme文件的提交,很是坎坷. 首先打开了github的首页,对于满屏的英文,我是头大的.百度搜索教程,百度翻译等等,这些都使用上了.带着试一试的态度,我按了creat ...
- Android 数据库管理— — —升级数据库
package com.example.databasetest; import android.content.Context;import android.database.sqlite.SQLi ...
- iOS socket保持后台连接 ios9.0 xcode8.0
可以保持后台,但申请上架是肯定会被拒的 本教程是基于AsyncSocket库的简单开发! socket机制今天就不说了,毕竟百度上太多太详尽了! 1.先new一个工程: 2.要写socket的界面遵 ...
- PHP时区配置
在PHP安装目录中找到 php.ini-development 复制创建新的副本 找到 :date.timezone = 修改为 date.timezone = PRC 并保存为php.ini PRC ...
- sumoselect插件
由于项目需要,研究了下sumoselect插件,接下来简单介绍下sumoselect. 在百度上搜索“sumoselect.js”,查到的网页基本上都有对sumoselect的基本介绍,如下: 简单介 ...
- C#中隐藏(new)、方法重写(override)、重载(overload)的区别
转自:http://www.cnblogs.com/glife/archive/2009/12/28/1633947.html 重载.重写和隐藏的定义: 重载:public string ToStri ...
- 必须掌握的八个cmd 命令
一,ping 它是用来检查网络是否通畅或者网络连接速度的命令.作为一个生活在网络上的管理员或者黑客来说,ping命令是第一个必须掌握的DOS命令,它 所利用的原理是这样的:网络上的机器都有唯一确定的I ...
- Chp11 11.7
<Java语言程序设计>P327 题目要求使用数组来模拟实现ArrayList的一些方法,并要求可以根据实际长度来实现数组自动增长,这里只贴出LikeArrayList.java 测试方法 ...