问题1:MYSQL连接本机 localhost 数据库报错
报错:Unable to load authentication plugin ‘caching_sha2_password’.
– 创建连接
– 出现报错:
– 尝试解决
– 同样报错,依旧无效
报错信息:Unable to load authentication plugin ‘caching_sha2_pssword’.
解决办法:
在电脑程序里找到“MySQL 8.0 Command Line Client - Unicode”,输入密码后,执行以下命令即可。
复制以下代码:
ALTER USER ‘root’@‘localhost’ IDENTIFIED WITH mysql_native_password BY ‘test’;
注意!!!test为你在安装时候设置root的密码,若设置的其他,替换即可。
@aishuju 互动社区—MySQL安装/DBeaver使用常见问题汇总
– 点击测试
– 可以看到:
– 编辑器测试:
-- 测试代码
create database test530;
use test530;
select now();
select "hello world";
– 错误操作:
– 新建新的数据库,再做测试
测试
搞定OK !!!
问题2: MYSQL8+ 连接本机 localhost 数据库报错
报错:The server time zone value ‘Öйú±ê׼ʱ¼ä’ is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.
– 切换时区为GMT
-- 编译器测试代码:
create database test520;
use test520;
select now();
select "hello world";
– GAO DING 收工!!!
– 待解决
– 可能是问题1的原起,本来应该可以在根源上可以解决这个问题:
创造不易,觉得有帮助请点赞哈哈哈