mysql安装启动 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
首次安装mysql 启动 mysql -uroot 以下错误:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
解决方案:
vim /etc/my.cnf
在[mysqld] 部分添加以下一行。
skip-grant-tables
重启mysql服务
systemctl restart mysqld.service
修改mysql密码
mysql> update user set authentication_string = password("XX@123") where user='root';
Query OK, row affected, warning (0.00 sec)
Rows matched: Changed: Warnings:
退出mysql, 把之前/etc/my.cnf文件中skip-grant-tables 注释掉。
重启mysql服务
进入mysql服务
mysql> SET PASSWORD = PASSWORD('XX@123');
Query OK, rows affected, warning (0.01 sec)
mysql安装启动 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)的更多相关文章
- win10连接mysql提示:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
win10中cmd连接mysql提示:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YE ...
- MySQL学习笔记——ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) Enter password: E ...
- mysql登录遇到ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
执行mysql -uroot -p,出现如下问题 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using pass ...
- Linux下mysql出错:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
安装: 1.新开的云服务器,需要检测系统是否自带安装mysql # yum list installed | grep mysql 2.如果发现有系统自带mysql,果断这么干 # yum -y re ...
- CentOS 7.6下解决登录MySQL时,ERROR 1045 (28000): Access denied for user root@localhost (using password: YES
https://blog.csdn.net/sinat_35406909/article/details/79763782
- MySQL ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)的真正原因
在博客Linux mysql 5.6: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: N ...
- MySQL密码正确却无法本地登录,ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
MySQL密码正确却无法本地登录 报错如下: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password ...
- 升级到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因为/tmp权限不足而导致ERROR 1045 (28000): Access denied for user root@localhost (using password: NO)的解决方案
本机是centos 6.5 安装的mysql是5.1的版本. 在安装mysql之后,第一次启动mysql服务的时候,需要/tmp有777(rwxrwxrwx)的权限,然而楼主的/tmp是755(rw ...
随机推荐
- KindEditor3.x整合教程-Xproer.WordPaster
版权所有 2009-2017 荆门泽优软件有限公司 保留所有权利 官方网站:http://www.ncmem.com/ 产品首页:http://www.ncmem.com/webplug/wordpa ...
- iOS Programming Recipe 6: Creating a custom UIView using a Nib
iOS Programming Recipe 6: Creating a custom UIView using a Nib JANUARY 7, 2013 BY MIKETT 12 COMMENTS ...
- TextView 垂直居中
需要区分的是这里的top,bottom,ascent,descent,baseline是指字内容的属性,通过getPaint().getFontMetricsInt()来获取得到.和字体内容的外部容 ...
- (转)打造一套UI与后台并重.net通用权限管理系统
原文地址:http://www.cnblogs.com/LRBPMS/p/3425997.html 一.前言 从进行到软件开发这个行业现在已经有几年了,在整理出这个套开发框架之前自己做了不少重复造轮子 ...
- php中this、self、parent解析
概述: this:指向类当前对象的指针:self:指向类本身,一般指向类中的静态变量:parent:指向父类的指针,一般使用parent来调用父类的构造函数. 下面通过程序详细介绍: 1.this & ...
- Vc6.0 编译发生致命链接错误 :不能打开exe的文件
错误: fatal error LNK1104: cannot open file "Debug/CeshiToolBar1.exe" 解决方法:打开任务管理器,找到对应的exe应 ...
- TSQL--游标Dem
DECLARE @ID INT; ); ); DECLARE MyCursor CURSOR FOR ) ID,NAME1 FROM dbo.TB1 ORDER BY ID; OPEN MyCurso ...
- bitnami openedx安装的各种坑及痛苦经历
那天在华为网站上学习,看见他们的培训系统挺不错的,看到下边写着openedx,百度了一下是个开源软件,挺流行的,在这之前对于openedx没有任何了解,然后开始了一周多的痛苦经历. 首先在opened ...
- C#线程和异步
C#Thread学习 C#ThreadPool学习 C#Task学习 C#backgroundWorker c# 锁的使用 C#前台线程和后台线程区别 C#Async,await异步简单介绍 C#委托 ...
- Jquery 【on事件】
一.on事件的定义和用法 on() 方法在被选元素及子元素上添加一个或多个事件处理程序. 自 jQuery 版本 1.7 起,on() 方法是 bind().live() 和 delegate() 方 ...