搭建mysql数据库问题汇总

本文介绍了MySQL中常见的错误及其解决办法,包括未知列名错误、密码不满足政策要求及远程访问授权等问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1、ERROR 1054 (42S22): Unknown column 'password' in 'field list'

  解决方式:

update mysql.user set authentication_string=password('123456') where user='root';  #修改密码成功

2、ERROR 1819 (HY000): Your password does not satisfy the current policy requirements

   解决方式:select @@validate_password_length;

    查询密码长度,默认为8,需要重新设置

    set global validate_password_policy=0;

    set global validate_password_length=1;

    set global validate_password_mixed_case_count=2;

    此时就可以设置123456的密码了

3、远程访问

    查询 select host,user,authentication_string from user;

    授权  grant all privileges  on *.* to root@'%' identified by "password";

     flush privileges;

     select host,user,authentication_string from user;

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值