mindoc-org / mindoc

Golang实现的基于beego框架的接口在线文档管理系统
https://mindoc.com.cn/docs/mindochelp
Apache License 2.0
7.29k stars 1.9k forks source link

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

Open 120011676 opened 6 years ago

120011676 commented 6 years ago

请按照一下格式提交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 commented 6 years ago

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

120011676 commented 6 years ago

👍

zhangrt commented 6 years ago

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

telfordNiu commented 6 years ago

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

lifei6671 commented 6 years ago

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

mumuhhh commented 5 years ago

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

cnspray commented 5 years ago

因报索引长度过长的错误,升级为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