MySQL 8 'this authentication plugin is not supported'问题处理

Golang使用MySql的一些问题 Golang操作数据库遇到的问题记录1.dial tcp 127.0.0.1:3306: connect: connection refused 1.dial tcp 127.0.0.1:3306: connect: connection refused 确认mysql是否打开 移除/etc/my.cnf中的skip-networking #2.register db Ping default... 阅读详情

     MySQL更新到8版本之后,程序连接时报this authentication plugin is not supported 错误

解决方法

可能是以下两种方式导致的

方法一:

   由于MySQL8的默认加密方式为caching_sha2_password,而之前版本的加密方式为mysql_native_password,所以可以通过修改MySQL 8的用户加密方式

alter user root@localhost identified with mysql_native_password by 'passwd';

       解释:这行语句有两层含义,第一:修改root的密码为’ passwd’ ,摒弃原来的旧密码。第二:使用mysql_native_password对新密码进行编码。  

alter user root@% identified with mysql_native_password by 'passwd';

       如果修改后报this user requires mysql native password authentication

       则修改MySQL的配置文件/etc/my.cnf,加上default-authentication-plugin=mysql_native_password

[mysqld]

default-authentication-plugin=mysql_native_password

      

     重启MySQL服务

 

方法二:

    MySQL驱动太老导致的,需要更新MySQL驱动

 

Debian 8 Jessie LEMP 安装避坑指南:systemd、MariaDB与PHP5.6兼容性实战 LEMP栈是Linux环境下Web服务的经典技术组合,其核心在于Nginx、MySQL(或MariaDB)、PHP三者在特定发行版中的协同机制。Debian 8(Jessie)作为首个默认启用systemd的稳定版,彻底改变了服务管理逻辑,同时其软件源中MySQL已被MariaDB替代、PHP版本锁定为5.6、Nginx依赖backports仓库——这些底层差异导致大量通用教程失效。本文聚焦Debian 8 Jessie这一已EOL但仍在部分生产环境运行的快照,解析systemd对mysql服务名的接管、p 阅读详情

相关推荐

LDO稳定性分析

根据补偿方式和拓扑结构的不同,三个极点之间的相互位置有可能发生变化,但 是 LDO 通常采用较大的输出电容 Cout,以及较大的调整管也会导致较大的 Cpar, 所以 p1、p2 通常位于较低的频率处,而 p3 和 z1 则由于 Resr较小会位于较高的频 率处。不过幸运的是,对于较大的 Cout来说,只要选择合适的 Resr,就可以将左半平面零点 Z1 的频率降低,甚至使 Z1 进入单位增益带宽内,左半平面零点的进入将对相位有所改善,这不仅可以消除振荡的风险,还可以在单位增益频率处得到较好的相位裕度。

模拟芯片设计 1595

go连接MySQL报错:this authentication plugin is not supported的解决

MySQL升级8.0以上版本后,用go连接MySQL会报错this authentication plugin is not supported,是因为MySQL8.0版本修改了加密方式,所以只要修改一下密码的加密方式就可以了。 进入root用户,修改root用户的密码和加密方式:这里修改密码为“root” mysql> alter user root@localhost identif...

Charliewolf的博客 1万+

基于角谱传播的MATLAB仿真:从相位恢复看自由空间光传播

本文详细介绍了基于角谱传播理论的MATLAB仿真方法,用于模拟自由空间光传播过程。通过傅里叶光学原理,将光场分解为频谱并应用传播相位滤波器,实现了从纯相位物体到可观测衍射图样的仿真。文章结合具体代码,演示了如何利用角谱法进行相位恢复,为计算成像和生物医学检测等领域的研究提供了实用的仿真工具和思路。

weixin_29055699的博客 283

mysql错误:this authentication plugin is not supported

this authentication plugin is not supported 应用程序连接mysql docker一直报错:this authentication plugin is not supported。 google发现,原来是mysql新版本(8.0以上)将root用户使用的plugin更新成caching_sha2_password。 登录mysql输入如下命令可以看...

c359719435的专栏 1万+

PYNQ-Z2 开发板从镜像烧录到 Jupyter 交互全流程指南

本文详细介绍了PYNQ-Z2开发板从镜像烧录到Jupyter交互的全流程指南,包括硬件解析、镜像烧录技巧、设备启动与网络配置、Jupyter Notebook深度使用以及实战案例分享。通过具体步骤和实用技巧,帮助开发者快速上手PYNQ-Z2开发板,实现高效的FPGA开发和智能家居控制应用。

weixin_28736355的博客 441

DSH-Work:一个让DeepSeek下载即用的Harness客户端

使用大模型工具时,环境配置往往比模型本身更让人头疼。DeepSeek Harness作为一类封装层,将模型调用、上下文管理、参数控制等复杂细节统一收拢,对外提供简洁操作入口。开源的DSH-Work正是这样一款Harness客户端,它通过自带运行时与保守默认配置,实现了下载即用、免配环境的目标,让使用者无需掌握Python、CUDA等专业知识即可快速连接DeepSeek云端或本地服务。对于非技术背景的用户,它降低了AI工具的使用门槛;对于开发者,它把时间从环境排错中解放出来,更专注于提示词调优与工作流设计。无

weixin_29048309的博客 346

golang连接mysql报错:this authentication plugin is not supported 解决方案

MySQL升级8.0以上版本后,在用第三方库github.com/Go-SQL-Driver/MySQL打开数据库时会报错this authentication plugin is not supported,这是因为MySQL8.0版本修改了加密方式,所以只要修改一下密码的加密方式就可以了。 首先用root用户进入MySQL,修改root用户的密码和加密方式:这里修改密码为abc345 ...

whatday的专栏 1463

数字电路复位信号设计(异步复位、同步释放)笔记详解

复位信号设计(异步复位、同步释放)笔记详解 1 时序设计 1.1 复位信号设计(异步复位、同步释放) 1.1.0 复位恢复时间和清除时间 首先解释一下恢复时间(recovery time)和清除时间(removal time):(以复位信号低电平有效为例) 复位恢复时间(recovery time):撤销复位时,复位信号无效到时钟有效沿来临之间需要维持的最小的时间,类似于同步时钟的建立时间setup time; 复位清除时间(removal time):复位时,在时钟有效沿来临之后复位信号还需要保持复位

weixin_42294124的博客 1万+

mysql this_mysql错误:this authentication plugin is not supported

this authentication plugin is not supported应用程序连接mysql docker一直报错:this authentication plugin is not supported。google发现,原来是mysql新版本(8.0以上)将root用户使用的plugin更新成caching_sha2_password。登录mysql输入如下命令可以看到:mysq...

weixin_33231849的博客 954

AI+医疗:多模态模型让肺结节诊断准确率突破95%+的实战方案

多模态融合是必由之路:单一影像模型难以突破95%准确率,必须整合临床、生物标志物等多维数据跨模态注意力机制是核心:简单拼接效果差,注意力机制能自动学习各模态权重,提升融合效果临床适配比技术先进更重要:模型输出必须符合医生诊断习惯,提供可解释的决策依据持续学习是长期成功的关键:医疗数据分布不断变化,模型必须具备自适应能力多学科协作是保障:放射科、胸外科、病理科、AI工程师共同参与模型设计与优化。

专注于Python爬虫开发,分享爬虫技巧、项目实战与反爬经验,使用Scrapy、BeautifulSoup等工具,解决数据抓取难题。 1024

AI 编程助手新玩法:用 Claude Code 一键调用国产大模型(DeepSeek/Kimi/GLM 对比)

本文深入评测了Claude Code与三大国产大模型(DeepSeek、Kimi、智谱GLM)的集成效果,详细对比了它们在代码生成质量、响应速度和特殊场景支持度等方面的差异。通过实测数据和实战技巧,帮助开发者选择最适合的AI编程助手组合,提升开发效率。

weixin_30955617的博客 489

Python3.7.2连不上Mysql 8.0的解决方案,亲测有效。

本人最近在做python课设,要用到mysql数据库,本来看菜鸟教程的操作,连接mysql数据库,结果报了“this authentication plugin is not supported”的错误,然后查看网上各种解决方案,但是都一样的,通过各种方式修改密码,但是并不奏效,没什么用,话不多说,上教程: 首先安装python的mysql包: pip install pymysql 一定要看到Successfully install 才行!安装好可以运行 pip list 看看:看有没有PyM

秋日物语的博客 4798

华为OD机试 - 猴子吃桃 - 二分查找(Java 新系统 100分)

每一题都有详细的答题思路、详细的代码注释、样例测试,发现新题目,随时更新,全天优快云在线答疑。

学Java,找哪吒 3851

panic: shop db open failed: this authentication plugin is not supported

经查,是因为mysql的版本是8.0.33,8以上的版本用户密码默认加密方式为“caching_sha2_password”,由于项目的各种包版本较早,可能不支持此种方式,当前解决方法是修改mysql增加对老版本加密方式“mysql_native_password”的支持。用go链接本地mysql时,报了此错误。再重启mysql使其生效即可。

梁吉林的博客 385

lwip-2.0.3

lwip是瑞典计算机科学院(SICS)的Adam Dunkels 开发的一个小型开源的TCP/IP协议栈。实现的重点是在保持TCP协议主要功能的基础上减少对RAM 的占用。

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

2021-06-22golang 链接数据库报用户验证失败

golang链接数据库报错 错误日志 this authentication plugin is not supported panic: runtime error: invalid memory address or nil pointer dereference [signal 0xc0000005 code=0x0 addr=0x0 pc=0xac22f7] 原因 mysql8.0以上的版本会因为验证方式不一样导致验证失败 1cmd下链接数据库 mysql -hlocalhost -uroot -p

qq_40227419的博客 400

VC中sqlite的使用

在VC中对sqlite的使用,实现数据库大批数据的快速插入,读取数据库中的数据在ListCtrl中显示

【数据库学习】——纠错:mysql Authentication plugin ‘caching_sha2_password‘ is not supported

【数据库学习】——纠错:mysql Authentication plugin ‘caching_sha2_password‘ is not supported

python_AI_fans的博客 9882

visio安装包

Microsoft Office Visio 是一款专业的制图软件。利用经过更新的形状、协作工具和数据链接图表,创建专业级图表以简化复杂的信息。

Go -- this user requires mysql native password authentication 错误

转:https://www.cnblogs.com/mafeng/p/11027332.html this user requires mysql native password authentication 在连接mysql的url上加上?allowNativePasswords=true,这次正常了。 转载于:https://www.cnblogs.com/...

dianshuai2414的博客 1444

MySQL 8.0 不能被远程连接的解决办法及修改密码、创建用户、授予所有权

2019独角兽企业重金招聘Python工程师标准>>> ...

weixin_34390996的博客 256

mysql passwor authen_解决mysql 8.0.20版本“this user requires mysql native password authentication”问题...

经过查询后得知是MySQL 8的用户密码加密方式导致,MySQL 8 的默认密码加密方式为 :caching_sha2_password,之前常用的低版本的密码加密方式为:mysql_native_password,所以需要把MySQL 8中的用户密码加密方式修改为常用的加密方式:mysql_native_password直接修改配置文件,在mysql的配置文件中加入如下配置:default-au...

weixin_42463165的博客 1061

Python连接MySQL报错Authentication plugin ‘caching_sha2_password‘ is not supported

mysql.connector.errors.NotSupportedError: Authentication plugin '看到Successfully installed mysql-connector-python-8.0.32 protobuf-3.20.3才是成功了。链接本地数据库是可以的,但是无法链接服务器,因为服务器的MySQL版本太高了,所以...如下。打开cmd执行pip install mysql-connector-python。成功之后重启pacman。大功告成可以连上数据库了。

陈一一同学的博客 6860

Mysql连接报错:mysql_native_pas5word.failed

错误:Authentication to host '127.0;0.1’for user 'root’usingmethod 'mysql_native_pas5word.failed with message : Reading fromthe stream has failedo 解决方案1: 添加SslMode=None server=127.0.0.1;Database=xxx;port=3306;User ID=xxxx;Password='xxxxx';charset=utf8;Allow U

qq_37107602的博客 4195

Mysql8.0密码问题 mysql_native_password和caching_sha2_password

Mysql

m0_71163619的博客 6867

Authentication plugin ‘caching_sha2_password‘ is not supported解决办法

`pip uninstall mysql-connector` `python -m pip install mysql-connector-python`

灵族小威的博客 707

连接mysql8报错authentication plugin ‘caching_sha_password‘ cannot be loaded

场景:在自己电脑上安装mysql8,使用官方自带MySQL Workbench 8.0 CE可视化工具连接没问题,但是使用Navicat连接时报错Authentication plugin 'caching_sha_password' cannot be loaded原因分析:查看相关资料得知,mysql8.0之前的版本使用的加密规则是mysql_native_passwordmysql8.0以后的版本使用的加密规则是caching_sha_password解决办法:1.将加密规则调整为 mysql_nat

一枚逗比 874
上一篇: MySQL查询某个字段的重复数据
下一篇: Java线程协作wait和notify使用示例
思维的深度
博客等级 码龄11年 2万+粉丝 391原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值