MYSQL安装初始化之后有一个默认密码,如下2.a!yNasp8Dn
- A temporary password is generated for root@localhost: 2.a!yNasp8Dn
用Native客户端连接时报错:1251 client does not support,但是我们通过命令行是可以连接的,我们测试一下执行以下代码查看一下用户的信息:
- select host,user,plugin,authentication_string from mysql.user;
或者执行查看数据库:
- You must reset your password using ALTER USER statement before executing this statement.
可能以上两行查询指令都会返回提示:
You must reset your password using ALTER USER statement before executing this statement.
系统提示我们需要更改密码,那我们就说一下解决办法。
按如下步骤操作:
- 1.MYSQL之后直接修改密码
- mysql -uroot -p
- 输入密码:2.a!yNasp8Dn
- 执行
- alter user user() identified by "88888888"
- 2.修改用户密码
- ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '88888888';
- 更新user为root,host为% 的密码为88888888
- 一般先用下面的:localhost本地
- ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '88888888';
- 更新user为root,host为localhost 的密码为88888888
- 3.查看用户信息
- select host,user,plugin,authentication_string from mysql.user;
第三步执行能看到数据库用户信息,此时再登录应该不会有问题了。
以上就是新安装mysql报错1251 client does not support的详细内容,更多关于新安装mysql报错1251 client does not support的资料请关注九品源码其它相关文章!