Navicat 连接mysql8.0时报错

命令

mysql -u root -p
use mysql
select user,host,plugin from user;
alter user ‘haidragon‘@‘%‘ identified with mysql_native_password by ‘pass123‘;
select user,host,plugin from user;
exit
mysql.server restart (mac)

192:etc haidragon$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 18
Server version: 8.0.15 Homebrew

Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement.

mysql> use mysql
Database changed
mysql> select user,host,plugin from user;
+------------------+-----------+-----------------------+
| user | host | plugin |
+------------------+-----------+-----------------------+
| haidragon | % | caching_sha2_password |
| mysql.infoschema | localhost | caching_sha2_password |
| mysql.session | localhost | caching_sha2_password |
| mysql.sys | localhost | caching_sha2_password |
| root | localhost | caching_sha2_password |
+------------------+-----------+-----------------------+
5 rows in set (0.00 sec)

mysql> alter user ‘haidragon‘@‘%‘ identified with mysql_native_password by ‘pass123‘
-> ;
Query OK, 0 rows affected (0.01 sec)

mysql> select user,host,plugin from user;
+------------------+-----------+-----------------------+
| user | host | plugin |
+------------------+-----------+-----------------------+
| haidragon | % | mysql_native_password |
| mysql.infoschema | localhost | caching_sha2_password |
| mysql.session | localhost | caching_sha2_password |
| mysql.sys | localhost | caching_sha2_password |
| root | localhost | caching_sha2_password |
+------------------+-----------+-----------------------+
5 rows in set (0.00 sec)

mysql> exit
Bye
192:etc haidragon$ sqlite3
Display all 116 possibilities? (y or n)
192:etc haidragon$ sqlit
192:etc haidragon$ my
my_print_defaults mysql_secure_installation mysqldump
myisam_ftdump mysql_ssl_rsa_setup mysqldumpslow
myisamchk mysql_tzinfo_to_sql mysqlimport
myisamlog mysql_upgrade mysqlpump
myisampack mysqladmin mysqlrouter
mysql mysqlbinlog mysqlrouter_plugin_info
mysql.server mysqlcheck mysqlshow
mysql_client_test mysqld mysqlslap
mysql_config mysqld_multi mysqltest
mysql_config_editor mysqld_safe mysqlxtest
192:etc haidragon$ mysql.server restart
Shutting down MySQL
.. SUCCESS!
Starting MySQL
.. SUCCESS!
192:etc haidragon$
参考:
https://blog.csdn.net/myNameIssls/article/details/84031426

原文地址:http://blog.51cto.com/haidragon/2349084

时间: 2024-10-07 18:31:54

Navicat 连接mysql8.0时报错的相关文章

Navicat连接mysql8.0报错 2059 1396

很多人写alter user 'Xue'@'%' identified with mysql_native_password by '123456'; 测试我本地不能用会报1396错误: 将%改为localhost可以连接成功: alter user 'Xue'@'localhost' identified with mysql_native_password by '123456'; FLUSH PRIVILEGES; 原文地址:https://www.cnblogs.com/1lwf/p/1

navicat连接mysql8.0+版本报错2059

ERROR 2059 : Authentication plugin 'caching_sha2_password' cannot be loaded 问题: 连接Docker启动的mysql出现:ERROR 2059: Authentication plugin 'caching_sha2_password' cannot be loaded 问题出现原因: 在用navicat连接MySQL8+时会出现2059错误,这是由于新版本的MySQL使用的是caching_sha2_password验

Navicat11.1连接Mysql8.0报错1251的解决办法

今天下载mysql-8.0.13,完成配置及正常启动后,Navicat11.1工具连接时总报错:1251,找到解决办法主是要mysql8的加密方式不同.具体解决办法如下:一.管理员权限打开CMD,输入mysql的root帐号及密码: D:\mysql8>mysql -u root -p输入root的密码回车二.更改mysql的方式:mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVE

用Navicat连接Oracle数据库时报错ORA-28547:connection to server failed,probable Oracle Net admin error

用Navicat连接Oracle数据库时出现如下错误 上网一查原来是oci.dll版本不对.因为Navicat是通过Oracle客户端连接Oracle服务器的,Oracle的客户端分为两种,一种是标准版,一种是简洁版,即Oracle Install Client.而我们用Navicat时通常会在自己的安装路径下包含多个版本的OCI,如果使用Navicat连接Oracle服务器出现ORA-28547错误时,多数是因为Navicat本地的OCI版本与Oracle服务器服务器不符造成的.所以我们要做的

【已解决】使用Navicat连接MySQL数据库时报错Client does not support authentication protocol requested by server; consider upgrading MySQL client

报错缘由: 起初在验证一个mybatis的demo时提示"Error querying database"(见下方完整代码),找了很多方法没有解决,最后在贴吧找到答案.错误原因是安装mysql时Authentication Method选择了第一种强加密方法,改成第二种问题就解决了. 解决方法: 打开mysql安装程序(或者重装,但是重装很麻烦),重新配置MySQL Server 配置Authentication Method这一步时,选择第二种加密方法,重新打开Navicat,问题解

navicat连接MySQL8.0.11提示2059错误

错误原因:mysql加密规则的改变: mysql加密规则:mysql_native_password      mysql8之前的版本   caching_sha2_password     mysql8 解决方法: ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER; //修改加密规则 ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_na

Navicat连接MySQL8.0版本时 建议升级连接客户端这个提示怎么办

开始->mysql 8.0 command line client ->执行下面的命令//开启mysql服务mysql.server start//进入mysqlmysql -u root -p//修改密码方案3(对)USE mysql; ALTER USER 'root'@'localhost'IDENTIFIED WITH mysql_native_password BY '密码';//重启FLUSH PRIVILEGES; 可能在修改密码那条指令会报error错误  如果报错了 多次重复

【问题记录】Navicat Premium连接mysql-8.0.17时出现2059 - Authentication plugin 'caching_sha2_password’....错误

问题描述: Navicat Premium连接mysql-8.0.17时出现2059 - Authentication plugin 'caching_sha2_password’ cannot be loaded:......错误 问题分析: mysql8 之前的版本中加密规则是mysql_native_password,而在mysql8之后,加密规则是caching_sha2_password. 解决办法: 1.登陆数据库:mysql - u root -p; 2.切换数据库:use mys

Navicat连接MySQL8+时出现2059报错

当我们连接时,会报2059错误 在用navicat连接MySQL8+时会出现2059错误,这是由于新版本的MySQL使用的是caching_sha2_password验证方式,但此时的navicat还没有支持这种验证方式.解决方法就是将验证方式改为以前版本(5.7及以下)使用的验证方式mysql_native_password.具体的验证方式可以查看默认数据库'mysql'中user表plugin字段.在命令行中登录数据库时不会出现2059错误,在命令行中登录数据库,执行下面的命令. ALTER