centos7 上安装mysql5.7后登录报错ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: Yes 或者No)
原文转载自以下链接:https://blog.csdn.net/keepd/article/details/77151006
安装完mysql后会有个临时密码去日志查看,但是查看登录修改密后还是不行
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password:yes)
于是
1,停止mysql服务
systemctl stop mysqld.service
2,修改配置文件无密码登录
vi /etc/my.cnf
在最尾部加上
skip-grant-tables
保存
3,启动mysql
systemctl start mysqld.service
4,登录musql
mysql -u root
此处注意不要加-p
5,修改密码,mysql5.7用此语法
use mysql ;
update mysql.user set authentication_string=password('123456') where user='root' ;
FLUSH PRIVILEGES;
6,回到第二步骤去掉加上的
skip-grant-tables
保存 重启mysql就ok了
#########################################################################
其实默认安装完了mysql后或在日志中生成一个默认的密码 /var/log/mysqld.log 中
拿到默认密码后登录mysql 进行密码重新设置
set password=password('you password');
如果密码级别与默认的级别要求不符时候会报
Your password does not satisfy the current policy requirements
此时需要修改级别与最小的默认密码位数
set global validate_password_policy=0;
set global validate_password_length=4;
然后在进行设置密码就好了
###################
远程连接时1130错误
mysql;use mysql;
mysql;select 'host' from user where user='root';
mysql;update user set host = '%' where user ='root';
mysql;flush privileges;
mysql;select 'host' from user where user='root';
启动 OTRS 守护进程并激活相应的监控此进程的 cron 任务(必须以 otrs 用户执行)
/opt/otrs/bin/otrs.Daemon.pl start
/opt/otrs/bin/Cron.sh start
##2.6、加入开机启动 ##
chkconfig mysqld on
chkconfig httpd on
centos7 上安装mysql5.7后登录报错ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: Yes 或者No)的更多相关文章
- 密码正确 mysql无法登陆 red7.3 上安装mysql5.6后登录报错ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using passswd :yes)
集群需要mysql存储元数据,就在前几天还运行好好的,突然就进不去了......还是太菜,遇到的bug少. 引起这种故障的原因有很多......第一个坑比较多,大部分用户也就用第一个就可以解决问题,我 ...
- 解决mysql登录报错ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)问题
问题描述: 在ubuntu14.04上安装完MYSQL后,MYSQL默认给分配了一个默认密码,但当自己在终端上使用默认密码登录的时候,总会提示一个授权失败的错误. 报错信息:Access denied ...
- 升级到macOS 10.12 mysqlb报错ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
系统升级到macOS 10.12后启动mysql后,在终端输入mysql 报错ERROR 1045 (28000): Access denied for user 'root'@'localhost' ...
- mysql安装在centos7报错ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
原文链接:http://blog.csdn.net/kuluzs/article/details/51924086 [问题]:mysql版本:5.7.13 首次在centos下安装MySQL,客户端连 ...
- CentOS命令登录MySQL时,报错ERROR 1045 (28000): Access denied for user root@localhost (using password: NO)错误解决方法
1.停用mysql服务:# /etc/rc.d/init.d/mysqld stop 2.输入命令:# mysqld_safe --user=mysql --skip-grant-tables --s ...
- Linux下登陆MySQL时遇到报错"RROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) "
前言 作者在2021-07-21时遇到 linux下登陆MySQL时遇到报错"RROR 1045 (28000): Access denied for user 'root'@'localh ...
- Win7下mysql root账户登录提示:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)解决方案
ERROR 1045 (28000): Ac-- password: YES)这个意思是密码不正确,那就修改密码: 如果你是服务器是 windows xp/2000/2003/nt 都可以使用这个方法 ...
- deepin安装Mariadb后,登录时出现ERROR 1045 (28000): Access denied for user 'root'@'localhost'
安装Mariadb的时候设置了root密码,但是登录的时候出现了这样的提示 这里记录下我的处理方法.我是用的如果重置root密码的套路. 首先,在/etc/mysql/mariadb.conf.d/5 ...
- Ubuntu下MySQL报错:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
在Ubuntu下 想要登录mysql数据库 root@JD:~# mysql -uroot -p 报错 ERROR 1045 (28000): Access denied for user 'root ...
随机推荐
- 来自苹果的编程语言——Swift简单介绍【整理】
2014年06月03日凌晨,Apple刚刚公布了Swift编程语言,本文从其公布的书籍<The Swift Programming Language>中摘录和提取而成.希望对各位的iOS& ...
- Golang 临时对象池 sync.Pool
Go 1.3 的sync包中加入一个新特性:Pool.官方文档可以看这里http://golang.org/pkg/sync/#Pool 这个类设计的目的是用来保存和复用临时对象,以减少内存分配,降低 ...
- 【洛谷】【线段树】P1047 校门外的树
[题目描述:] 某校大门外长度为L的马路上有一排树,每两棵相邻的树之间的间隔都是1米.我们可以把马路看成一个数轴,马路的一端在数轴0的位置,另一端在L的位置:数轴上的每个整数点,即0,1,2,……,L ...
- criterions的选择
criterions分为几类,其中有classification criterions与regression criterions.classification criterions是针对离散的,re ...
- 多线程之ThreadLocal
Java并发编程:深入剖析ThreadLocal 想必很多朋友对ThreadLocal并不陌生,今天我们就来一起探讨下ThreadLocal的使用方法和实现原理.首先,本文先谈一下对ThreadLoc ...
- python matplotlib quiver——画箭头、风场
理解参考:https://blog.csdn.net/liuchengzimozigreat/article/details/84566650 以下实例 import numpy as np impo ...
- Kafka设计解析(十五)Kafka controller重设计
转载自 huxihx,原文链接 Kafka controller重设计 目录 一.Controller是做什么的 二.Controller当前设计 三.Controller组成 四.Controlle ...
- Spring源码分析(四)容器的基础XmlBeanFactory
摘要:本文结合<Spring源码深度解析>来分析Spring 5.0.6版本的源代码.若有描述错误之处,欢迎指正. 经过Spring源码分析(二)容器基本用法和Spring源码分析(三)容 ...
- PAT乙级1007
1007 素数对猜想 (20 分) 让我们定义dn为:dn=pn+1−pn,其中pi是第i个素数.显然有d1=1,且对于n>1有dn是偶数.“素数对猜想 ...
- 删除iptables nat 规则
删除FORWARD 规则: iptables -nL FORWARD --line-numberiptables -D FORWARD 1 删除一条nat 规则 删除SNAT规则 iptables ...