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 ...
随机推荐
- Golang Http Server源码阅读
建议看这篇文章前先看一下net/http文档 http://golang.org/pkg/net/http/ net.http包里面有很多文件,都是和http协议相关的,比如设置cookie,head ...
- ABAP知识点提纲
编号 课程名称 课程内容 预计课时 10.1.1~10.1.2 SAP系统与产品集 1. 了解SAP常见产品 ,了解SAP系统架构 1 10.1.3~10.1.4 导航界面与用户界面 1. 了解SAP ...
- webapi中使用swagger
net WebApi中使用swagger 我在WebApi中使用swagger的时候发现会出现很多问题,搜索很多地方都没找到完全解决问题的方法,后面自己解决了,希望对于遇到同样问题朋友有帮助.我将先一 ...
- ddt 测试用例UI运用
import xlrd from selenium import webdriver import ddt import time import unittest class Excel(object ...
- 2-51单片机ESP8266学习-AT指令(开发板51单片机自动冷启动下载原理)
前言:了解就行,不必深究 上一篇链接 http://www.cnblogs.com/yangfengwu/p/8720148.html 源码链接:https://pan.baidu.com/s/1wT ...
- Hibernate的应用与注解开发
Hibernate注解可以帮助我们大大简化hbm映射文件的配置,学习记录之. 先看示例: 1 package com.webShop.domain; 2 import java.io.Serializ ...
- 删除Oracle Online Redo 测试
删除Oracle Online Redo 测试 SQL> select * from v$log; GROUP# THREAD# SEQUENCE# BYTES BLOCKS ...
- Git知多少!!!
第一次写博客,内心有点小激动呀!首先祝大家圣诞快乐~~啦啦啦~~好了,我要步入正题啦!今天是上班第二周,终于开始写需求啦!开森~~撒花~~ 来这里第一个要学的就是git的操作啦!入职第一天发了一个大大 ...
- MongoDB DBA 实践1-----Windows
一.先决条件 1.支持的平台 在3.4版中更改: MongoDB不再支持32位x86平台. MongoDB需要x86-64架构并支持以下内容: Windows 7 / Server 2008 R2 W ...
- Weblogic申请和配置SSL证书
一. 概述 SSL(Secure Sockets Layer 安全套接层),及其继任者传输层安全(Transport Layer Security,TLS)是为网络通信提供安全及数据完整性的一种安全协 ...