转自:http://blog.csdn.net/u010603691/article/details/50379282

新安装的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' ;

A.update user set password=password("123456") 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数据库

MySQL5.7更改密码时出现ERROR 1054 (42S22): Unknown column 'password' in 'field list'的更多相关文章

  1. Mysql 5.7:更改密码时出现ERROR 1054 (42S22): Unknown column 'password' in 'field list'

    1.环境 在新服务器上重新安装了环境,原来是5.6的,就升级到了5.7版本. 2.问题 新安装的MySQL5.7,登录时提示密码错误,安装的时候并没有更改密码,后来通过免密码登录的方式更改密码. 输入 ...

  2. mysql5.7.18.1修改用户密码报错ERROR 1054 (42S22): Unknown column 'password' in 'field list'解决办法

    本意向修改一个用户的密码,网上搜到的命令为如下 mysql> update user set password=password(“新密码”) where user=”用户名”; 执行后报错 E ...

  3. mysql 5.7 ERROR 1054(42S22) Unknown column 'password' in ‘field list’ 报错

    mysql 忘记密码 报错?ERROR 1054(42S22) Unknown column 'password' in ‘field list’原因:5.7版本下的mysql数据库下已经没有pass ...

  4. ERROR 1054 (42S22): Unknown column 'password' in 'field list'

    解决: update MySQL.user set authentication_string=password('123456') where user='root'; FLUSH PRIVILEG ...

  5. MySQL 报错ERROR 1054 (42S22): Unknown column 'plugin' in 'mysql.user'

    MySQL  我们在创建用户的时候,可能会遇到以下报错: ERROR 1054 (42S22): Unknown column 'plugin' in 'mysql.user' 说明mysq.user ...

  6. Fedora26下Mysql改密码Unknown column 'password' in 'field list'

    本意向修改一个用户的密码,网上搜到的命令为如下 1 mysql> update user set password=password(“新密码”) where user=”用户名”; 执行后报错 ...

  7. python - django 执行数据库迁移后数据库并未更新 和 InternalError: (1054, u"Unknown column 'xxx' in 'field list'")问题

    一.发生情况:当你修改数据库结构后进行 python manage.py makemigrations 和 python manage.py migrate 后发现控制台会给你返回一个下面的结果,但是 ...

  8. MySQL ERROR 1054(42S22)

    修改用户的密码,网上搜到的命令为如下 执行后报错 ERROR 1054(42S22) Unknown column 'password' in ‘field list’ 错误的原因是 5.7版本下的m ...

  9. MySQL 1054错误 Unknown column .... in 'on clause'

    ERROR 1054 (42S22): Unknown column ... in 'on clause' 原因: MySQL5.0 Bug, 要把联合的表用括号包含起来才行: 例: SELECT ( ...

随机推荐

  1. Python读取中文txt文件错误:UnicodeEncodeError: 'gbk' codec can't encode character

    with open(file,'r') as f: line=f.readline() i=1 while line: line=line.decode('utf-8') line=f.readlin ...

  2. 善用VS中的Code Snippet来提高开发效率

    http://www.cnblogs.com/anderslly/archive/2009/02/16/vs2008-code-snippets.html http://www.cnblogs.com ...

  3. 在Webstorm/Phpstorm中设置连接FTP,并快速进行文件比较,上传下载,同步等操作

    Phpstorm除了能直接打开localhost文件之外,还可以连接FTP,除了完成正常的数据传递任务之外,还可以进行本地文件与服务端文件的异同比较,同一文件自动匹配目录上传,下载,这些功能是平常ID ...

  4. Angularjs与bootstrap.datetimepicker结合实现日期选择器

    http://www.lovelucy.info/angularjs-best-practices.html http://damoqiongqiu.iteye.com/blog/1917971 ht ...

  5. ios 在storyboard 和 xib中,显示自定义view的预览效果

    发现FSCalendar这个控件能在xib中显示预览效果,是怎么实现的呢?其中涉及的知识又有哪些? 主要就是IBInspectable 和 IB_DESIGNABLE 先看 IBInspectable ...

  6. 针对跑MySQL的Linux优化【转】

    本文来自:http://www.mysqlsupport.cn/linux-performance-tuning-tips-mysql/ 因为很多MySQL的生产环境都在Linux下,我决定指出一些L ...

  7. Java for LeetCode 221 Maximal Square

    Given a 2D binary matrix filled with 0's and 1's, find the largest square containing all 1's and ret ...

  8. 5.SpringMVC静态文件的访问

    我们在进行springMVC开发时,必定会在jsp页面引入js文件.img文件和css文件.大多数人会将这些分类存放在WebRoot文件下新建的文件夹下面.同时,会在web.xml文件中配置拦截所有请 ...

  9. Bestcoder13 1003.Find Sequence(hdu 5064) 解题报告

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5064 题目意思:给出n个数:a1, a2, ..., an,然后需要从中找出一个最长的序列 b1, b ...

  10. codeforces 558B. Amr and The Large Array 解题报告

    题目链接:http://codeforces.com/problemset/problem/558/B 题目意思:给出一个序列,然后找出出现次数最多,但区间占用长度最短的区间左右值. 由于是边读入边比 ...