Skip to content

不支持mysql最新版本,caching_sha2_password认证方式 #268

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
120011676 opened this issue Apr 27, 2018 · 7 comments
Open

不支持mysql最新版本,caching_sha2_password认证方式 #268

120011676 opened this issue Apr 27, 2018 · 7 comments

Comments

@120011676
Copy link

请按照一下格式提交issue,谢谢!

  1. 你当前使用的是哪个版本的 MinDoc(godoc_linux_amd64 version)?
    v0.10.1

  2. 你当前使用的是什么操作系统?
    linux

  3. 你是如何操作的?
    linux部署

  4. 你期望得到什么结果?
    正常

  5. 当前遇到的是什么结果?
    不支持mysql最新版本,caching_sha2_password认证方式
    [ORM]2018/04/27 18:00:20 register db Ping default, this authentication plugin is not supported
    2018/04/27 18:00:20.167 [E] [command.go:54] 注册默认数据库失败: register db Ping default, this authentication plugin is not supported

@lifei6671
Copy link
Collaborator

目前的版本不支持caching_sha2_password和mysql_native_password的认证方式。
目前我本地也没有8.0的mysql测试。
等下个版本,我测试后加上。

@120011676
Copy link
Author

👍

@zhangrt
Copy link

zhangrt commented May 7, 2018

这个身体什么时候能解决?我这里也遇到这个问题,暂时不想重装mysql。。。

@telfordNiu
Copy link

我也遇到了,什么时候能解决?

@lifei6671
Copy link
Collaborator

目前golang实现的mysql库不支持caching_sha2_password,所以这个功能只能暂时搁置了。go-sql-driver/mysql#625

@mumuhhh
Copy link

mumuhhh commented Nov 18, 2018

尴尬今天装了 一下发现是支持sqlite3的

@cnspray
Copy link

cnspray commented Apr 28, 2019

因报索引长度过长的错误,升级为8.0了,目前完美运行。my.ini文件如下:
[mysqld]

设置3306端口

port=3306

设置mysql的安装目录

basedir=D:\phpStudy\PHPTutorial\MySQL\

设置mysql数据库的数据的存放目录

datadir=D:\phpStudy\PHPTutorial\MySQL\data\

允许最大连接数

max_connections=200

允许连接失败的次数。

max_connect_errors=10

服务端使用的字符集默认为UTF8

character-set-client-handshake = FALSE
character-set-server=utf8mb4
collation-server = utf8mb4_general_ci
init_connect='SET NAMES utf8mb4'

创建新表时将使用的默认存储引擎

default-storage-engine=INNODB

默认使用“mysql_native_password”插件认证

#mysql_native_password
default_authentication_plugin=mysql_native_password
#去掉only_full_group_by 模式,8.0不能包含NO_AUTO_CREATE_USER
sql_mode = "STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION"
[mysql]

设置mysql客户端默认字符集

default-character-set=utf8mb4

[client]

设置mysql客户端连接服务端时默认使用的端口

port=3306
default-character-set=utf8mb4 @lifei6671 @120011676

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants