MySQL ERROR 1698 (28000) 错误

Debian/Ubuntu系统 MySQL安装、卸载MySQL、ERROR1698(28000):Access denied for user root@localhost错误解决方法 安装MySQL步骤 打开终端(Ctrl + Alt + T),分别输入以下三条命令 sudo apt-get install mysql-server sudo apt-get install mysql-client sudo apt-get install libmysqlclient-dev 卸载MySQL步骤 打开终端(Ctrl + Alt + T),输入以下命令 s... 阅读详情
~$ mysql -u root -p
Enter password: 
ERROR 1698 (28000): Access denied for user 'root'@'localhost'

  

解决步骤:

停止mysql服务

~$ sudo service mysql stop

 

以安全模式启动MySQL

~$ sudo mysqld_safe --skip-grant-tables &

 

MySQL启动之后就可以不用密码登陆了

~$ mysql -u root
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.10 MySQL Community Server (GPL)

 

查看一下user表,错误的起因就是在这里, root的plugin被修改成了auth_socket,用密码登陆的plugin应该是mysql_native_password。

复制代码
mysql> select user, plugin from mysql.user;
+-----------+-----------------------+
| user      | plugin                |
+-----------+-----------------------+
| root      | auth_socket           |
| mysql.sys | mysql_native_password |
| dev       | mysql_native_password |
+-----------+-----------------------+
3 rows in set (0.01 sec)
复制代码

 

关于auth_socket,在官方有说明: https://dev.mysql.com/doc/mysql-security-excerpt/5.5/en/socket-authentication-plugin.html ,反正现在暂时不用它, 那就把这里改了。

复制代码
mysql> update mysql.user set authentication_string=PASSWORD('newPwd'), plugin='mysql_native_password' where user='root';
Query OK, 1 row affected, 1 warning (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 1

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
复制代码

 

重启服务,问题就解决了

复制代码
~$ sudo service mysql stop
...
 * MySQL Community Server 5.7.10 is stopped
~$ sudo service mysql start
..
 * MySQL Community Server 5.7.10 is started
~$ mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.10 MySQL Community Server (GPL)
复制代码
本地部署 Anything LLM+Ollama+DeepSeek R1 大模型并实现外部访问 DeepSeek 一经发布就引起社会的广泛的关注,因为 DeepSeek 的价格低廉,性能卓越,提供了多种使用方式,满足不同用户的需求和场景。本文将详细的介绍如何在本地 Windows 上安装部署 Anything LLM + Ollama 来实现用户和 DeepSeek-r1 对话的功能以及利用路由侠内网穿透实现外网访问。 阅读详情

相关推荐

Ubuntu 24.04 下 NoMachine 极速安装与远程桌面配置全攻略

本文详细介绍了在Ubuntu 24.04系统下安装和配置NoMachine远程桌面的完整指南。从系统准备、分步安装到性能调优和常见问题解决,帮助用户快速实现低延迟的远程桌面访问。特别适合开发者和IT管理员在Linux环境下高效部署远程工作环境。

moon9的博客 945

Navicat 远程连接数据库 ERROR 1698 : Access denied for user ‘root‘@‘localhost‘ 问题解决

查看是否有远程ip登陆授权 use mysql; select user,host from user; 这里我把host设置成了’%'来匹配任意ip,如果此时为localhost或者其他ip,则说明限制了ip登录,没有远程ip登陆授权。 通过命令 UPDATE user SET host = '%' WHERE user = 'root' AND host = 'localhost'; GRANT ALL PRIVILEGES ON *.* TO'root'@'%' IDENTIFIED BY '密码

eliforsharon的博客 8192

PicoRV32 笔记 05

PicoRV32 本地总线接口

jjinl的专栏 1574

ERROR 1698 (28000): Access denied for user ‘root‘@‘localhost‘解决方法

ERROR 1698 (28000): Access denied for user 'root'@'localhost'解决方法

leoatliang的博客 3万+

Dify视觉模型节点避坑指南:我用Qwen2.5-VL做OCR识别时踩过的3个坑(及解决方案)

本文分享了使用Dify平台和Qwen2.5-VL视觉模型进行OCR票据识别时遇到的三个常见问题及解决方案,包括文件变量传递、结构化输出和条件分支判断失效。通过实战经验,帮助开发者优化多模态模型在财务自动化中的应用,提升OCR识别精度和效率。

weixin_29284885的博客 405

上下文理解的AI增强方案:AI应用架构师的架构洞察

本文将从AI应用架构师的视角,深入探讨“上下文理解”的技术本质、核心挑战,以及一套可落地的上下文增强架构方案。我们会拆解上下文理解的底层需求,分析架构设计中的关键决策,并通过具体案例展示如何构建一个能“记住过去、理解现在、预测未来”的AI系统。三个维度:上下文的内容范围(短期/中期/长期)、数据类型(文本/结构化/多模态)、技术挑战(窗口限制/信息过载/跨会话一致性);三种架构模式:分层上下文存储(热/冷数据分离)、上下文路由(按需筛选)、动态压缩(适配模型窗口);四个关键组件。

欢迎来到我的优快云空间!这里聚焦AI大模型应用实战,分享前沿技术、实战案例与开发经验。 220

服务mysql80和mysqla同时启动,报错(The specified database user/password combination is rejected: [28000][),亲测有效

mysql登录报错

m0_43609780的博客 699

项目安全等保测评加固手册

安全等级测评的目的是通过对目标系统在安全技术及管理方面的测评,对目标系统的安全技术状态及安全管理状况做出初步判断,给出目标系统在安全技术及安全管理方面与其相应安全等级保护要求之间的差距。测评结论作为委托方进一步完善系统安全策略及安全技术防护措施依据!!

菜鸟运维升级之路 2416

出现ERROR1698(28000):Access denied for user root@localhost错误解决方法

我的操作系统是ubuntu18.04,以下是我的mysql版本: 安装完成后,登录mysql的时候就出现了如下错误: 因为安装的过程中没让设置密码,可能密码为空,但无论如何都进不去mysql。 下面是我的处理过程: Step1:修改mysqld.cnf配置文件 在ubuntu的terminal(也即终端)上输入sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf,进入到这个配置文件,然后在这个配置文件中的[mysqld]这一块中加入skip-..

阿泉的博客 2148

7、刚度矩阵与弹簧元素:有限元分析的核心

本文深入探讨了有限元分析中的核心概念——刚度矩阵与弹簧元素。详细介绍了刚度矩阵的定义、构建方法及其对称性、正定性和稀疏性等性质,同时解析了弹簧和阻尼器元素的特性及其在模拟复杂系统中的应用,如液压缸、减震器等。通过结合刚度矩阵与弹簧元素,可以提高结构模型的精度并模拟复杂的工程系统。文章还讨论了优化策略、验证流程、误差分析及实际应用案例,展示了这些技术在桥梁分析、汽车悬挂系统等领域的重要作用,并展望了其在未来新材料、智能结构和数字孪生技术中的发展潜力。

nice1的博客 235

【Matlab光伏功率预测】基于GRU门控循环单元的光伏功率时间序列预测(附MATLAB代码)

【Matlab光伏功率预测】基于GRU门控循环单元的光伏功率时间序列预测(附MATLAB代码)

k8291121的博客 1100

the specified database user/password combination is rejected.......的解决方法

The specified database user/password combination is rejected: com.mysql.cj.exceptions.CJException: Access denied for user 'root'@'localhost' (using password: YES)问题全网最全解决方法!

weixin_43421778的博客 9684

【STM32Cube_14】使用硬件I2C读写环境光强度传感器(BH1750)

本篇详细的记录了如何使用STM32CubeMX配置STM32L431RCT6的硬件I2C外设读取环境光强度传感器数据(BH1750)

Mculover666的博客(嵌入式) 7242

Linux系统 MySQL出现ERROR1698(28000):Access denied for user root@localhost错误解决方法

service mysql status //查看mysql状态 service mysql start //启动MySQL mysql -uroot -p 当输入第三行命令按下回车发现出现ERROR1698(28000):Access denied for user root@localhost时,应该采取办法: 1.在终端继续输入 sudo vim /etc/mysql/mysql.conf.d/mysqld.cnf 按i进入编辑模式,在[mysqld]这一块中加入skip-gra.

qq_42729246的博客 1745

深度学习工具包 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")

Camera2Demo

在Camera2 的基础上进行封装,使得Camera2一堆初始化逻辑与Activity分离,降低耦合度,完成预览拍照并保存的操作

MySQL提示ERROR 1698 (28000): Access denied for user 'root'@'localhost'错误解决办法

.登录MySQL $ mysql -u root -p 输入密码,如果登录成功下面的就不用看了;如果提示出错,则我们尝试启用安全模式登入MySQL,这样可以绕过密码登入,登入后再修改密码。 2.安全模式登入MySQL $ sudo /etc/init.d/mysql stop [sudo] hee 的密码: [ ok ] Stopping mysql (via systemctl): mysq...

五石之瓠 以为大樽 浮于江湖 悠笑人生 1077

LinePhone3.2.7(android端最新版本) sip客户端

SIP客户端For android:LinePhone3.2.7(最新版本),官网地址:http://www.linphone.org/

解决Mysql最常见的无法连接问题,MySql ERROR 1698 (28000) 错误:Access denied for user 'root'@'localhost'

MySql ERROR 1698 (28000) 错误:Access denied for user 'root'@'localhost'   本文参考:https://blog.csdn.net/qq_35709559/article/details/82691883   网上的方案查了一天半,都没有有效的,好在最后解决了。 废话不讲,直接说解决方案 原因和解决方案:mysql里其实...

u011495642的博客 3765

数学建模模型总结

这是本人在两年内准备参加数学建模竞赛搜集到的模型资料,已经经过了本人的筛选和整理,希望能够对准备参加数学建模竞赛的学弟学妹们提供一些帮助!

mysql出现ERROR1698(28000):Access denied for user root@localhost错误解决方法

mysql出现ERROR1698(28000):Access denied for user root@localhost错误解决方法

asdfgh0077的博客 140

Mysql部署 MySQL ERROR 1698 (28000) 错误

mysql 设计 登陆失败并有这个错误代码: ~$ mysql -u root -p Enter password: ERROR 1698 (28000): Access denied for user ‘root’@‘localhost’ 解决步骤: 停止mysql服务 ~$ sudo service mysql stop 以安全模式启动MySQL ~$ sudo mysqld_safe --...

qq_41843228的博客 267

MySQL提示ERROR 1698 (28000): Access denied for user ‘root‘@‘localhost‘错误解决办法

MySQL提示ERROR 1698 (28000): Access denied for user ‘root’@'localhost’错误解决办法 1.输入:service mysql restart(重启数据库) 如果还是报错,第二种方法: 1.输入:sudo vim /etc/mysql/mysql.conf.d/mysqld.cnf 进入到mysqld.cnf配置文件,然后在这个配置文件中的[mysqld]这一块中加入skip-grant-tables skip-grant-tables随便插入即可

qq_44913716的博客 993

Ubuntu mysql:MySQL ERROR 1698 (28000) 错误

错误:MySQL ERROR 1698 (28000) 1. 查看一下user表 错误的起因就是在这里, root的plugin被修改成了auth_socket, 用密码登陆的plugin应该是mysql_native_password。 mysql> select user, plugin from mysql.user; 2.命令: mys...

mutourenoo的专栏 470

mysql 1698_mysql出现ERROR1698(28000):Access denied for user root@localhost错误解决方法

Ubuntu/Debian 安装MySQL 后登录显示1698(28000)错误代码,mysql版本如下:安装完成后,登录mysql的时候就出现了如下错误:因为安装的过程中没让设置密码,可能密码为空,但无论如何都进不去mysql下面是处理过程:1.修改mysqld.cnf配置文件在terminal上输入sudo vi /etc/mysql/mysql.conf.d/mysqld.cnf,进入到这个...

weixin_35679269的博客 1075
上一篇: 定时任务 中的job中注入的service接口 为空 解决方法
下一篇: git Couldn't load this key (OpenSSH SSH-2 private key)
rabbit0708
博客等级 码龄15年 12粉丝 27原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值