登录mysql 报 Access denied for user 'root'@'localhost' 错误
安装mysql后登录提示:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password:yes)
解决如下:
1.停止mysql服务
systemctl stop mysqld.service
2.修改配置文件无密码登录
vim /etc/my.cnf
在最后加上
skip-grant-tables
保存
3.启动mysql
systemctl start mysqld.service
4.登录mysql
mysql -u root
注意这里不要加-p
5.修改密码
mysql5.7用此语法
use mysql;
update mysql.user set authentication_string=password('') where user='root' ;
6.回到第二部把刚加的那句删掉
保存,重启mysql就可以了
登录mysql 报 Access denied for user 'root'@'localhost' 错误的更多相关文章
- mariadb mysql 报'Access denied for user 'root'@'localhost' (using password: NO)'错误的解决
C:\Program Files\MariaDB 10.2\bin>mysql admin -u root password "x123456789" mysql Ver 1 ...
- 【转载】在MySQL登录时出现Access denied for user 'root'@'localhost' (using password: YES) 拒绝访问,并可修改MySQL密码
在MySQL登录时出现Access denied for user 'root'@'localhost' (using password: YES) 拒绝访问,并可修改MySQL密码 2018年08月 ...
- mysql Access denied for user root@localhost错误解决方法总结(转)
mysql Access denied for user root@localhost错误解决方法总结(转) mysql Access denied for user \'root\'@\'local ...
- mysql grant all on *.* to xxx@'%' 报Access denied for user 'root'@'localhost'
今日,开发反馈某台mysql服务器无法登陆,解决之后,远程登录后发现用户只能看到information_schema,其他均看不到. 故登录服务器执行: mysql> grant all on ...
- Win7环境下mysql报错1045:Access denied for user root@localhost错误解决方法
产生场景:在涉及到连接数据库操作的时候,会报1045:Access denied for user root@localhost. 比如:本地建立的数据库连接不上,在IDEA等开发工具中使用反向生成. ...
- mac 安装mysql + 修改root用户密码 + 及报Access denied for user 'root'@'localhost' (using password:YES)解决办法
1.下载MySQL 到mysql的官网http://dev.mysql.com/downloads/mysql/然后在页面中会看到“MySQL Community Server”下方有一个“downl ...
- 在MySQL登录时出现Access denied for user 'root'@'localhost' (using password: YES) 拒绝访问,并可修改MySQL密码
这两天装了一个mysql 5.7数据库,但是在本地dos登陆不上去,报错Access denied for user 'root'@'localhost'(using password:YES): 也 ...
- MySQL 出现 Access denied for user 'root'@'localhost' (using password: YES) 错误
登录某台服务器的mysql时候总报错: mysql2/client.rb:58:in `connect': Access denied for user 'root'@'localhost' (usi ...
- mysql Access denied for user root@localhost错误解决方法总结
原文:http://www.111cn.net/database/mysql/44142.htm Access denied for user 'root'@'localhost' (using pa ...
随机推荐
- Mathcad操作tips:函数、符号计算
函数 1. 利用“:”进行函数定义,如 2. 函数支持range variable输入,如 3. 常用数学函数可以在Insert - Function菜单中寻得. 4. 当不确定某个名字是否是函数名时 ...
- HBase介绍(4)---常用shell命令
进入hbase shell console$HBASE_HOME/bin/hbase shell如果有kerberos认证,需要事先使用相应的keytab进行一下认证(使用kinit命令),认证成功之 ...
- django drf Filter
1.定义get_queryset()方法 from django.shortcuts import render from rest_framework.views import APIView fr ...
- docker 进入容器
- Oracle彻底卸载
Oracle彻底卸载 卸载:oracle卸载1.删除注册表:打开注册表:regedit 打开路径: <找注册表 :开始->运行->regedit> HKEY_LOCAL_MAC ...
- 题解 UVA11300 【Spreading the Wealth】
环形均分纸牌问题应该不少人都很熟悉了,而且题解区写的也比较全了...... 我这篇题解主要是介绍一个新的STL--nth_element 以及解答几个其他题解里面有应用但是没有注释的问题.(比如说我第 ...
- 201621123023《Java程序设计》第7周学习总结
一.本周学习总结 1.1 思维导图:Java图形界面总结 二.书面作业 1. GUI中的事件处理 1.1 写出事件处理模型中最重要的几个关键词. 关键词:事件源.事件监听器.事件处理方法.事件适配器 ...
- day11学python 多线程+queue
多线程+queue 两种定义线程方法 1调用threading.Thread(target=目标函数,args=(目标函数的传输内容))(简洁方便) 2创建一个类继承与(threading.Threa ...
- [Swift实际操作]八、实用进阶-(8)使用performSegue在故事板页面之间进行数据传递
本文将演示故事板页面之间的数据传递.首先在一个空白项目中,打开项目自带的故事板文件(Main.storyboard).故事板中已经拥有了一个视图控制器,点击选择该视图控制器.然后依此点击[Editor ...
- redis 3.0 集群__安装
参考文档 http://redis.io/topics/cluster-tutorial http://redis.io/topics/cluster-spec http://redis.readth ...