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 ...
随机推荐
- 2016-7-15(1)使用gulp构建一个项目
gulp是前端开发过程中自动构建项目的工具,相同作用的还有grunt.构建工具依 靠插件能够自动监测文件变化以及完成js/sass/less/html/image/css/coffee等文件的语法检查 ...
- USACO 刷水
BZOJ 1666 水.. BZOJ 1579 分层图最短路. BZOJ 1782 从一开始若某头牛停在U,那么U的子树的时间都会加一用BIT维护DFS序就行了 BZOJ 1572 贪心+堆 排序后查 ...
- 主要由顶点容器构成的平面图形类(Shape)——(第一次作业Draw类定义升级)
// https://github.com/orocos/orocos_kinematics_dynamics/blob/master/orocos_kdl/src/frames.hpp // Vec ...
- A Simple Problem with Integers_树状数组
Problem Description Let A1, A2, ... , AN be N elements. You need to deal with two kinds of operation ...
- 【转】浅思OC的语言特性
算了算,学习IOS已经有一段时间了.今天花了点时间思考一下OC的语言特性,让自己的心不要那么浮躁,注重基础,回归本源. OC做为一门面向对象语言,自然具有面向对象的语言特性,如封装.继承.多态.他具有 ...
- MVC 知识点学习2
1._Layout.cshtml @RenderBody() 2.自定义扩展HtmlHelper(需要添加Bootstrap.js或者Bootstrap.min.js文件到项目中) namespa ...
- Android常见的控件
1.Log类的使用 (1)Log.v() v是verbose 提醒的意思 (2)Log.d() d是debug调试 (3)Log.i() i是info信息的意思 (4)Log.w() ...
- ICA和PCA
http://wenku.baidu.com/link?url=BsmIM7T4CU1D_MgiBzu4Ul1oLnM2Qpmc0sCfXIcD9S20qq3BEkSnuY4RUc7gDZoeFR1N ...
- selenium获取多窗口句柄并一一切换至原窗口句柄(三个窗口)
网上有很多是selenium基于python来获取两个窗口句柄与切换,本文实现用python+selenium获取多窗口句柄并一一切换至原窗口句柄(三个窗口),且在每个窗口下进行一个搜索或翻译,然后截 ...
- python3 filter用法(举例求0~n之间的素数)
在用python3求0~n之间的素数时,关于filter用法的有点模糊,于是上网查了一下filter用法. 求0~n之间素数的脚本prime.py: def f(x): plist = [0,0] + ...