mysql user password plugin
caching_sha2_password
caching_sha2_password
caching_sha2_password
caching_sha2_password
caching_sha2_password
mysql_native_password
D:/webCodeOnline/src/vendor/github.com/go-sql-driver/mysql/errors.go:4
// Go MySQL Driver - A MySQL-Driver for Go's database/sql package
//
// Copyright 2013 The Go-MySQL-Driver Authors. All rights reserved.
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at http://mozilla.org/MPL/2.0/. package mysql import (
"database/sql/driver"
"errors"
"fmt"
"io"
"log"
"os"
) // Various errors the driver might return. Can change between driver versions.
var (
ErrInvalidConn = errors.New("invalid connection")
ErrMalformPkt = errors.New("malformed packet")
ErrNoTLS = errors.New("TLS requested but server does not support TLS")
ErrOldPassword = errors.New("this user requires old password authentication. If you still want to use it, please add 'allowOldPasswords=1' to your DSN. See also https://github.com/go-sql-driver/mysql/wiki/old_passwords")
ErrCleartextPassword = errors.New("this user requires clear text authentication. If you still want to use it, please add 'allowCleartextPasswords=1' to your DSN")
ErrUnknownPlugin = errors.New("this authentication plugin is not supported")
ErrOldProtocol = errors.New("MySQL server does not support required protocol 41+")
ErrPktSync = errors.New("commands out of sync. You can't run this command now")
ErrPktSyncMul = errors.New("commands out of sync. Did you run multiple statements at once?")
ErrPktTooLarge = errors.New("packet for query is too large. Try adjusting the 'max_allowed_packet' variable on the server")
ErrBusyBuffer = errors.New("busy buffer")
) var errLog = Logger(log.New(os.Stderr, "[mysql] ", log.Ldate|log.Ltime|log.Lshortfile)) // Logger is used to log critical error messages.
type Logger interface {
Print(v ...interface{})
} // SetLogger is used to set the logger for critical errors.
// The initial logger is os.Stderr.
func SetLogger(logger Logger) error {
if logger == nil {
return errors.New("logger is nil")
}
errLog = logger
return nil
} // MySQLError is an error type which represents a single MySQL error
type MySQLError struct {
Number uint16
Message string
} func (me *MySQLError) Error() string {
return fmt.Sprintf("Error %d: %s", me.Number, me.Message)
} // MySQLWarnings is an error type which represents a group of one or more MySQL
// warnings
type MySQLWarnings []MySQLWarning func (mws MySQLWarnings) Error() string {
var msg string
for i, warning := range mws {
if i > 0 {
msg += "\r\n"
}
msg += fmt.Sprintf(
"%s %s: %s",
warning.Level,
warning.Code,
warning.Message,
)
}
return msg
} // MySQLWarning is an error type which represents a single MySQL warning.
// Warnings are returned in groups only. See MySQLWarnings
type MySQLWarning struct {
Level string
Code string
Message string
} func (mc *mysqlConn) getWarnings() (err error) {
rows, err := mc.Query("SHOW WARNINGS", nil)
if err != nil {
return
} var warnings = MySQLWarnings{}
var values = make([]driver.Value, 3) for {
err = rows.Next(values)
switch err {
case nil:
warning := MySQLWarning{} if raw, ok := values[0].([]byte); ok {
warning.Level = string(raw)
} else {
warning.Level = fmt.Sprintf("%s", values[0])
}
if raw, ok := values[1].([]byte); ok {
warning.Code = string(raw)
} else {
warning.Code = fmt.Sprintf("%s", values[1])
}
if raw, ok := values[2].([]byte); ok {
warning.Message = string(raw)
} else {
warning.Message = fmt.Sprintf("%s", values[0])
} warnings = append(warnings, warning) case io.EOF:
return warnings default:
rows.Close()
return
}
}
}
[webdev@iZwz91pyml1gysa2ko137xZ studygolang]$ cat log/error.log-180805
16:36:16.827360 LoadAuthorities authority read fail: this authentication plugin is not supported
16:36:16.848967 LoadRoles role read fail: this authentication plugin is not supported
16:36:16.870337 LoadRoleAuthorities role_authority read fail: this authentication plugin is not supported
16:36:16.892869 loadRecommendNodes node read fail: this authentication plugin is not supported
16:36:16.910600 LoadNodes node read fail: this authentication plugin is not supported
解决 客户端连接 mysql5.7 Plugin 'mysql_native_plugin' is not loaded错误 - 吖水的程序路 - 博客园 https://www.cnblogs.com/aashui/p/8995089.html
mysql user password plugin的更多相关文章
- Linux - Reset a MySQL root password
Use the following steps to reset a MySQL root password by using the command line interface. Stop the ...
- windows下解决mysql忘记password
windows下解决mysql忘记password mysql有时候忘记password了怎么办?我给出案例和说明!一下就攻克了! Windows下的实际操作例如以下 1.关闭正在执行 ...
- linux上MySQL改动password的各种方法,yc整理
MySQL改动password的各种方法 整理了下面四种在MySQL中改动rootpassword的方法,可能对大家有所帮助! 方法1: 用SET PASSWORD命令 mysql -uroot my ...
- mysql忘记password
有时候突然忘记MySQL的password会真的不爽,这里介绍一种MySQLpassword忘记时重置password的方法,操作系统win8,MySql version:5.6.10 1 在任务管理 ...
- 关于Mysql Enterprise Audit plugin的使用
正如之前看到的一篇文章,假设想要知道是谁登陆了你的数据库server,干了什么东西,那么你须要使用Mysql Enterprise Audit plugin. 以下介绍一下Mysql Enterpri ...
- Go -- this user requires mysql native password authentication 错误
this user requires mysql native password authentication 在连接mysql的url上加上?allowNativePasswords=true,这次 ...
- Configure the MySQL account associate to the domain user via MySQL Windows Authentication Plugin
在此记录如何将之前一次做第三发软件在配置的过程. 将AD user通过代理映射到mysql 用户. 在Mysql官网有这样一段话: The server-side Windows authentica ...
- mysql的password()函数和md5函数
password用于修改mysql的用户密码,如果是应用与web程序建议使用md5()函数, password函数旧版16位,新版41位,可用select length(password('12345 ...
- Mysql re-set password, mysql set encode utf8 mysql重置密码,mysql设置存储编码格式
There is a link about how to re-set password. http://database.51cto.com/art/201010/229528.htm words ...
随机推荐
- 转 new和malloc的区别
传送门 new和malloc的区别 1. malloc()函数 1.1 malloc的全称是memory allocation,中文叫动态内存分配. 原型:extern void *malloc(un ...
- RGB和YUV之比较【转】
转自:http://blog.csdn.net/qfnu08zzr/article/details/6763159 版权声明:本文为博主原创文章,未经博主允许不得转载. RGB 原理 RGB 是从颜色 ...
- Day 18 函数之一
函数参数: 1.形参变量只有在被调用时才分配内存单元,在调用结束时,即刻释放所分配的内存单元.因此,形参只在函数内部有效.函数调用结束返回主调用函数后则不能再使用该形参变量 2.实参可以是常量.变量. ...
- iOS-tableView上拉加载更多后,界面出现偏移
问题描述: 在做tableview的界面展示的时候,cell用自动计算高度的.但是在上拉加载更多的时候,数据请求完后,刷新界面,界面的顶部就出现了偏移 分析: 查阅资料后发现,当tableView的c ...
- 总结 Eclipse 编程常用的快捷键
Eclipse 常用快捷键Eclipse的编辑功能非常强大,掌握了Eclipse快捷键功能,能够大大提高开发效率.Eclipse中有如下一些和编辑相关的快捷键. 1. [ALT+/] 此快捷键为用户编 ...
- eclipse启动的时候 一直未响应状态 然后闪退
解决方案:在你的工作目录中,有一个.metadata目录,里面是工作区及各插件的信息,删除此目录可以解决问题.保险起见,先剪切到另一地方.再重启启动.
- Codeforces Round #321 (Div. 2) Kefa and Dishes 状压+spfa
原题链接:http://codeforces.com/contest/580/problem/D 题意: 给你一些一个有向图,求不超过m步的情况下,能获得的最大权值和是多少,点不能重复走. 题解: 令 ...
- Java开发者使用C++写程序踩的坑
笔者是一个很矛盾的人.平时用Java.但是一开始学习的时候学的是汇编语言,而且对C语言也很熟悉.为什么不学C++呢?是因为我可以完全用Java的编码规范去写C++.因此我不需要了解更多的诸如C++的命 ...
- BZOJ 2085 [POI2010] Hamsters
题面 Description Tz养了一群仓鼠,他们都有英文小写的名字,现在Tz想用一个字母序列来表示他们的名字,只要他们的名字是字母序列中的一个子串就算,出现多次可以重复计算.现在Tz想好了要出现多 ...
- BZOJ 3065 带插入区间第K小值
题目描述 Description 从前有n只跳蚤排成一行做早操,每只跳蚤都有自己的一个弹跳力a[i].跳蚤国王看着这些跳蚤国欣欣向荣的情景,感到非常高兴.这时跳蚤国王决定理性愉悦一下,查询区间k小值. ...