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的更多相关文章

  1. mysql init password centos

    https://www.cnblogs.com/FlyingPuPu/p/7783735.html

  2. Linux - Reset a MySQL root password

    Use the following steps to reset a MySQL root password by using the command line interface. Stop the ...

  3. windows下解决mysql忘记password

    windows下解决mysql忘记password   mysql有时候忘记password了怎么办?我给出案例和说明!一下就攻克了!    Windows下的实际操作例如以下    1.关闭正在执行 ...

  4. linux上MySQL改动password的各种方法,yc整理

    MySQL改动password的各种方法 整理了下面四种在MySQL中改动rootpassword的方法,可能对大家有所帮助! 方法1: 用SET PASSWORD命令 mysql -uroot my ...

  5. mysql忘记password

    有时候突然忘记MySQL的password会真的不爽,这里介绍一种MySQLpassword忘记时重置password的方法,操作系统win8,MySql version:5.6.10 1 在任务管理 ...

  6. Go -- this user requires mysql native password authentication 错误

    this user requires mysql native password authentication 在连接mysql的url上加上?allowNativePasswords=true,这次 ...

  7. mysql的password()函数和md5函数

    password用于修改mysql的用户密码,如果是应用与web程序建议使用md5()函数, password函数旧版16位,新版41位,可用select length(password('12345 ...

  8. 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 ...

  9. mysql "Your password has expired...."错误解决方案

    mysql -u root -p 进入mysql命令界面,然后输入 set password = password("新密码"); 参考:http://blog.csdn.net/ ...

  10. mysql user password plugin

    caching_sha2_passwordcaching_sha2_passwordcaching_sha2_passwordcaching_sha2_passwordcaching_sha2_pas ...

随机推荐

  1. ionic cordova 热更新(引用自www.zyyapp.com/post/116.html)

    上篇文章cordova 把html打包成安卓应用 http://www.zyyapp.com/post/115.html cordova 热更新是一个大坑,我看了一天一夜才明白.网上的教程都没说到重点 ...

  2. Android Handler 最佳的理解资料

  3. CSS样式-文字超出宽部分用省略号代替

    .name {text-overflow: ellipsis;white-space: nowrap;overflow: hidden;display:block;width:120px;    }

  4. web设计中那些因素可能影响网站后期优化

    web设计中那些因素可能影响网站后期优化. 1.网站代码的简洁实用性.网站源文件html代码.js代码.css代码等应尽可能的压缩处理.能用jquery-min.js的最好不要用jquery.js:c ...

  5. ZendStudio13 PHP调试环境快速配置

    1.百度ZendStudio13,汉化,破解,注册: 2.安装国产Apache+MySql一键安装环境phpStudy,方便快速  http://www.phpstudy.net/a.php/208. ...

  6. JavaScript闭包模型

      JavaScript闭包模型 -----  [原创翻译]2016-09-01  09:32:22 < 一>  闭包并不神秘 本文利用JavaScript代码来阐述闭包,目的是为了使普通 ...

  7. Swift中文教程 第2章 基本运算符 (20140604更新)

    今天我在下午又进行了新的翻译,之前我翻译的大家有没有看啊,感觉如何,我昨天下午不小心点了什么原先的文章都没了,大家的评论也没了,现在我也找不回来了,希望大家能继续给我新的评论和支持点个推荐,毕竟现在学 ...

  8. 1password密码库格式更新

    由于国内网络安全做的太差,经常发生被脱裤的事件,比如最近的网易邮箱(via 乌云),所以只好用1password这类密码管理软件,实现一站一密.昨晚半夜冻醒了,刷推刷到了这个:1password-le ...

  9. Ported my old SPH solver in Unity

    Here is the link to the web player version, http://www-scf.usc.edu/~taian/pages/sph/builds/12212014/ ...

  10. 解决msi文件在XP上安装未完成(提示安装程序被中断,未能安装app。需要重新启动该安装程序进行重试)的问题。

    如图所示,我利用Visual Studio 2015制作了一个小程序.基于.Net 4.0.用VS的Install扩展,新建Install项目进行打包.打包为.msi文件.该安装文件在已经安装了 .N ...