博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Mysql密码设置
阅读量:7079 次
发布时间:2019-06-28

本文共 1018 字,大约阅读时间需要 3 分钟。

在使用MySQL时,出现了这样的错误提示:

you must reset your password using alter,让重设密码。

clipboard.png

D:\xampps> mysql -uroot -prootmysql: [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 14Server version: 5.7.9Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql>

mysql 5.7增加了两个字段password_last_changed、password_lifetime来完善安全策略。

fault_password_lifetime来延长使用期限
或者

ALTER USER 'root'@localhost' PASSWORD EXPIRE INTERVAL 90 DAYS;ALTER USER 'root'@'localhost' PASSWORD EXPIRE NEVER;ALTER USER 'root'@'localhost' PASSWORD EXPIRE DEFAULT;

可以使用下面的语法进行权限设置:

mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY '518666' PASSWORD EXPIRE NEVER;Query OK, 0 rows affected (0.00 sec)

设置成功之后,可以成功使用 use mysql命令了~

clipboard.png

相关文章:

转载地址:http://lsvml.baihongyu.com/

你可能感兴趣的文章
AJax详解
查看>>
从一段时间段中获取所有日期
查看>>
Java中如何设置表格处于不可编辑状态
查看>>
Java JTable视图窗口滚动并定位到某一行
查看>>
课堂练习
查看>>
HTML学习成果 制作一个空白简历
查看>>
使用mybatis自带工具,自动生成表对应domain、mapper.xml以及dao
查看>>
餐饮ERP相关问题FAQ
查看>>
基于 Vue.js 的移动端组件库mint-ui实现无限滚动加载更多
查看>>
Matrix Computations 1
查看>>
springboot上传代码到gitlab并发布上线操作
查看>>
FILE * fopen(const char * path,const char * mode);
查看>>
[Flask]sqlalchemy使用count()函数遇到的问题
查看>>
[python](Docker SDK)上传镜像到私有仓库(tls、身份认证)
查看>>
听说是阿里笔试题
查看>>
使用pm2管理nodejs应用
查看>>
MySQL基础之---mysqlimport工具和LOAD DATA命令导入文本文件
查看>>
php 读取文件头部两个字节 判断文件的实际类型
查看>>
异或交换真的比开一个tmp快吗?
查看>>
使用sea.js管理你项目js文件
查看>>