linux下Mysql中user表没有Password字段,哪位大神指点指点啊!

ImFreshMan 2015-12-17 03:04:18
如图。。。。。。

在Linux Centos7.0 下装好Mysql以后,查看user表,没有password字段。可以直接在表上添加该字段么?

...全文
5920 13 打赏 收藏 转发到动态 举报
写回复
用AI写文章
13 条回复
切换为时间正序
请发表友善的回复…
发表回复
junbs 2019-03-22
  • 打赏
  • 举报
回复
引用 10 楼 JacyAcme 的回复:
update user set authentication_string=password("新密码") where user="root";
mysql5.7后字段password字段变成了authentication_string, 但函数password()没变
这句可以改密码,不过我第一次改了没生效,后来又改了一次才生效。
weixin_43025353 2018-08-21
  • 打赏
  • 举报
回复

mysql> select user,host,authentication_string,plugin from mysql.user;
mysql> update user set authentication_string=password("123456"),plugin='mysql_native_password' where user='root';
leeya66 2017-09-10
  • 打赏
  • 举报
回复
修改配置文件,/etc/my.cnf,允许免密登陆,
疯狂踩坑人 2017-08-28
  • 打赏
  • 举报
回复
update user set authentication_string=password("新密码") where user="root";
mysql5.7后字段password字段变成了authentication_string, 但函数password()没变
To_Young 2017-06-20
  • 打赏
  • 举报
回复
引用 8 楼 QQ919769936 的回复:
mysql5.7之后好像是没有password這个字段了,但是不知道现在用的是哪个字段存密码,哪位大神知道麻烦告诉一下,谢谢了
兄弟解决了么?弄我几天了!!!
天下莫柔于风 2017-03-31
  • 打赏
  • 举报
回复
mysql5.7之后好像是没有password這个字段了,但是不知道现在用的是哪个字段存密码,哪位大神知道麻烦告诉一下,谢谢了
bilibilibobobo 2016-12-23
  • 打赏
  • 举报
回复
我刚刚安装 5.7.17 设置密码 网上说给这个字段 authentication_string 给这个字段设置了 但是还连接不上。不知道LZ最后怎么解决的。
东云180 2016-06-06
  • 打赏
  • 举报
回复
哦原来MySQL5.7 mysql库user表中的密码字段(password)已废除了谢谢!
ImFreshMan 2015-12-18
  • 打赏
  • 举报
回复
引用 1 楼 zhao4zhong1 的回复:
不能添加password字段,因为authentication_string就是密码经编码后的内容。
老师你好,那像这种情况,表里面确实没有password字段,我如果不跳过用户验证连接数据库的时候就连不上啊。
ImFreshMan 2015-12-18
  • 打赏
  • 举报
回复
引用 2 楼 fan63182830 的回复:
默认就有 不需要添加
可是查出来的结果是,user表里面确实没有password字段。
皇御雷霆 2015-12-17
  • 打赏
  • 举报
回复
默认就有 不需要添加
赵4老师 2015-12-17
  • 打赏
  • 举报
回复
不能添加password字段,因为authentication_string就是密码经编码后的内容。

23,120

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 应用程序开发区
社区管理员
  • 应用程序开发区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧