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. Android开源框架:Universal-Image-Loader解析(二)MemoryCache

  2. MFC 网络编程中::connect返回-1问题

    在MFC编写网络时遇到了::connect总是返回-1,但是与服务器可以进行接收和发送消息的操作. 原因是在进行连接的时候我没有进行初始化:::WSAStartup(w, &data);//动 ...

  3. [解决方案] pythonchallenge level 4

    http://www.pythonchallenge.com/pc/def/linkedlist.php 查看页面源代码或者点击图片 http://www.pythonchallenge.com/pc ...

  4. 黑马程序员——【Java高新技术】——案例:银行业务调度系统

    ---------- android培训.java培训.期待与您交流! ---------- 一.银行业务调度系统需求 Ø 银行内有6个业务窗口,1 - 4号窗口为普通窗口,5号窗口为快速窗口,6号窗 ...

  5. 吐槽THINKPHP5命令行

    thinkphp,作为国内开源框架,一直在使用和学习. 但是实在忍不住想要吐槽一下他的开发文档,和 对初学者的不友好,建议刚接触MVC思想的人 还是尽量去使用其他框架当入门. 现在来吐槽一下think ...

  6. POJ1385 计算多边形的重心

    point gravity_center(point* p,int n) {    double area=0.0;    point ZERO;    ZERO.x = 0;    ZERO.y = ...

  7. check_pkg函数解析

    函数位置,conf/core,具体代码如下: check_pkg() { # Usage: check_pkg <command> <package> # It means: ...

  8. Mac快捷键与命令学习

    最近开始使用mac air,以前从来没有接触过IOS系统,各种操作捉急.Mac快捷键相当多,遇到各种操作不会就只好百度,然后整理了一堆有用或者没用的命令,一股脑儿列在下面.其中有不少命令是和linux ...

  9. 特殊的对象引用---$this

    只要是对象中的成员,必须使用这个对象($this)来访问到这个对象内部的属性和方法 特殊对象的引用$this就是再对象内部的成员方法中,代表本对象的一个引用,但智能在对象的成员方法中使用,不管是在对象 ...

  10. gdb 调试出现 ImportError: No module named 'libstdcxx'

    在emacs使用gdb调试程序,出现错误 , in <module> from libstdcxx.v6.printers import register_libstdcxx_printe ...