MySQL5.7密码list中password变了为authentication_string
2017-07-11 22:26
721 查看
新安装的MySQL5.7,登录时提示密码错误,安装的时候并没有更改密码,后来通过免密码登录的方式更改密码,输入update mysql.user set password=password('root') where user='root'时提示ERROR 1054 (42S22): Unknown column 'password' in 'field list',原来是mysql数据库下已经没有password这个字段了,password字段改成了
authentication_string
所以更改语句替换为update
MySQL.user set authentication_string=password('root') where user='root' ;即可
我的系统版本如下:
完整的更改mysql密码的方式如下:
1、vim /etc/my.cnf 加入skip-grant-tables
2、重启MySQL, /etc/init.d/mysqld restart
3、终端输入 mysql 直接登录MySQL数据库,然后use mysql
4、update mysql.user set authentication_string=password('root') where user='root' ;
mysql5.7更改密码应该采用命令
ALTER USER
'root'
@
'localhost'
IDENTIFIED BY
'********'其中密码的命名规则有所改变,详见
http://blog.csdn.NET/u010603691/article/details/50541979
5、编辑my.cnf文件删掉skip-grant-tables 这一行,然后重启MySQL,/etc/init.d/mysqld restart,否则MySQL仍能免密码登录
6、mysql -u root -p
然后输入密码即可登录MySQL数据库
相关文章推荐
- mysql 5.7 忘记密码,及修改密码问题,密码列不再是Password ,而是authentication_string
- mysql 5.7.14+ 版本更改密码, 原来user表的password编程了authentication_string
- Linux 下mysql 忘记root密码,修改密码怎么做?在mysql.user 中并没有password字段,但是有authentication_string
- mysql5.7密码过期ERROR 1862 (HY000): Your password has expired. To log in you must change
- mysql 5.7 版本后数据没有字段 password 所以修改 root 密码 需要
- MySQL 5.7 报错 ERROR 1054 (42S22): Unknown column 'password' in 'field list' 的解决办法
- Ubuntu16.04系统下忘记mysql密码,修改报错ERROR 1054 (42S22): Unknown column 'PASSWORD' in 'field list'
- mysql5.7.18.1修改用户密码报错ERROR 1054 (42S22): Unknown column 'password' in 'field list'解决办法
- mysql5.7设置简单密码报错ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
- MySQL5.7改密码无password字段
- Mysql 5.7 中如何禁用 密码检测插件(validate password plugin)
- mysql5.7 mysql库下面的user表没有password字段无法修改密码
- 初次登陆MySQL修改密码是出现Unknown column 'password' in 'field list'的解决方法
- MySQL 5.7.16 修改密码提示 ERROR 1054 (42S22): Unknown column ''password'' in ''field list''的原因
- mysql 5.7 版本,密码无法登陆,更改密码时出现ERROR 1054 (42S22): Unknown column 'password' in 'fie
- MySQL5.7改密码无password字段并存在1820的报错,并部署zabbix和监控mysql
- mysql5.7设置简单密码报错ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
- Linux初次登陆、重置MySQL密码步骤,以及错误Unknown column 'password' in 'field list'的解决方法
- MySQL5.7使用错误解决:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)【取消或重设root密码】
- MySQL5.7.13更改密码时出现ERROR 1054 (42S22): Unknown column 'password' in 'field list'