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 ...
随机推荐
- 【dll】关于__declspec的简记,由两个单词缩写而来!(转)
关于declspec的一点说明 我遇到这个单词总觉得记不住,时间一长就忘了.今天在复习dll的时候又遇到了这个单词,我感觉应该是两个单词的缩写,但又不敢确定,特地发帖网上求助,得到两位高手的帮助.下面 ...
- Button Style Status
<Window x:Class="Dxsl.WPF.APP.Views.StyleTest2" xmlns="http://schemas.microsoft.co ...
- Windwos2008如何关闭IE增强的安全配置
如题 方法:
- LeetCode OJ--Permutations *
https://oj.leetcode.com/problems/permutations/ 写出一列数的全排列 #include <iostream> #include <vect ...
- js-触屏滑动判断滑动方向(移动版)
var startx, starty; //获得角度 function getAngle(angx, angy) { return Math.atan2(angy, angx) * 180 / ...
- Codeforces Gym101572 J.Judging Moose (2017-2018 ACM-ICPC Nordic Collegiate Programming Contest (NCPC 2017))
Problem J Judging Moose 这个题是这里面最简单的一个题... 代码: 1 //J 2 #include <stdio.h> 3 #include <math. ...
- 通过房价预测入门Kaggle
今天看了个新闻,说是中国社会科学院城市发展与环境研究所及社会科学文献出版社共同发布<房地产蓝皮书:中国房地产发展报告No.16(2019)>指出房价上涨7.6%,看得我都坐不住了,这房价上 ...
- OpenLDAP给我的启发
首先这篇文章没什么技术性,但亮点是:我会给广大运维同行提一点建议,这个一点仅仅是一点,而不是很多点. 年前计划深度掌握一些诸如:Jenkins.Gitlab.ELK.k8s等的软件,但学着学着总是想学 ...
- Java ArrayList 详解
只记录目前为止关注的.JDK1.8 一.基础属性 1.1 内部参数 //空存储实例.直接new ArrayList()便是以该空数组作为实例 private static final Object[] ...
- Android中的动画总结
文章主要内容来源<Android开发艺术探索>,部分内容来源网上的文章,文中会有链接. Android系统提供了两个动画框架:属性动画框架和View动画框架. 两个动画框架都是可行的选项, ...