【linux】Centos下登陆mysql报错#1045 - Access denied for user 'root'@'localhost' (using password: NO)
创建mysql 远程链接
grant all privileges on *.* to 'test'@"%" identified by "test666 with grant option"; flush privileges;
在登录时候,无法登录。使用phpmyadmin 保错了:1045 - Access denied for user 'test'@'localhost' (using password: NO)
解决方法很简单
1.先关闭mysql服务: sudo /etc/init.d/mysqld stop 或者 service mysql stop
2.用管理员身份登陆mysql : mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
3.获取root权限: mysql -u root mysql
4.更改密码: mysql> UPDATE user SET Password=PASSWORD('你想要的密码') where USER='root';
5.归还特权: mysql> FLUSH PRIVILEGES;
6.退出mysql登陆: mysql> quit
7.启动mysql服务: sudo /etc/init.d/mysqld start 或者 service mysql start
8.可以用新密码登陆啦: mysql -uroot -p你的密码
【linux】Centos下登陆mysql报错#1045 - Access denied for user 'root'@'localhost' (using password: NO)的更多相关文章
- Win7环境下mysql报错1045:Access denied for user root@localhost错误解决方法
产生场景:在涉及到连接数据库操作的时候,会报1045:Access denied for user root@localhost. 比如:本地建立的数据库连接不上,在IDEA等开发工具中使用反向生成. ...
- 远程连接Linux mysql报错:Access denied for user ‘root’@‘localhost’(using password: YES)的解决方法
在新安装好的Centos7上刚安装好mysql,准备进去看看,但是登陆的时候,发现报错啦: ERROR 1045 (28000): Access denied for user 'root'@'loc ...
- idea 连接mysql报错:Access denied for user 'root'@'localhost'(using password:YES)。
这两天在idea中开发Web项目时,连接MYSQL数据库,出现问题:Access denied for user 'root'@'localhost'(using password:YES). ...
- 解决MySQL报错:Access denied for user ‘root’@‘localhost’(using password: YES)
Windows 10(mysql5.1) 修改配置文件 找到MySQL安装目录下配置文件my.ini(在我的win10环境下,其路径为C:\ProgramData\MySQL\MySQL Server ...
- Windows mysql提示:1045 access denied for user 'root'@'localhost' using password yes
Windows mysql提示:1045 access denied for user 'root'@'localhost' using password yes http://blog.csdn.n ...
- 启动报错:Access denied for user 'root'@'localhost' (using password:YES)
项目启动报错:Access denied for user 'root'@'localhost' (using password:YES) 原因:root帐户默认不开放远程访问权限,所以需要修改一下相 ...
- Mysql相关问题-----1045 Access denied for user 'root'@'localhost' (using password: YES)报错
MySQL 连接错误,使用Navicat连接MySQL出现错误:1045 Access denied for user 'root'@'localhost' (using password: YES) ...
- windows mysql提示:1045 access denied for user 'root'@'localhost' using password yes 解决方案
win7 MySql5.6.17提示:1045 access denied for user 'root'@'localhost' using password yes 从网上找到的解决方法,以此博客 ...
- vue项目中连接MySQL时,报错ER_ACCESS_DENIED_ERROR: Access denied for user 'root'@'localhost' (using password:YES)
一.前言 我们前端很多时候在写vue项目的时候,会把后端的数据拿到本地来跑,在连接MySQL数据库的时候,可能出现一些问题,如: ER_ACCESS_DENIED_ERROR: Access deni ...
随机推荐
- SQL与NoSQL的CRUD对照
SQL与NoSQL的CRUD对照 flyfish 2015-7-21 Create, Read, Update and Delete (CRUD) SQL方式 查 SELECT 列名称 FROM 表名 ...
- shell脚本----for循环
1.方法1 #!/bin/bash for((i=1;i<10;i++)) do echo $i done 保存为for1.sh 直接sh for1.sh 会报错: Syntax error ...
- ubuntu下 apache phpmyadmin 的安装和使用
// Apache //Task: Start Apache 2 Server /启动apache服务 # /etc/init.d/apache2 start //or $ sudo /etc/ini ...
- HTTP协议详解(文档)
目录引言................................................................................................ ...
- 關於 WebClient wc = new WebClient() 下載第三方數據不能進安安信任異常
報錯異常:The underlying connection was closed: Could not establish trust relationship for SSL/TLS secure ...
- Python 字符串切片
#-*- coding:utf-8 -*- #字符串切片 names = "abcdefgh" ''' 切片语法 names[起始位置:终止位置:步长] 起始位置:即字符串的下标, ...
- Windows消息队列一
系统消息--ID范围 -0x03FF 由系统定义好的小哦啊拍下哦,可以在程序中直接使用. 用户自定义消息--ID范围0x0400-0x7FFF 由用户自己定义,满足用户自己的需求.由用户自己发出消息, ...
- 关于VS2013常用到的快捷键
版本一 VS2013常用快捷键: 1.回到上一个光标位置/前进到下一个光标位置 1)回到上一个光标位置:使用组合键“Ctrl + -”: 2)前进到下一个光标位置:“Ctrl + Shift + - ...
- 第二百八十八节,MySQL数据库-索引、limit分页、执行计划、慢日志查询
MySQL数据库-索引.limit分页.执行计划.慢日志查询 索引,是数据库中专门用于帮助用户快速查询数据的一种数据结构.类似于字典中的目录,查找字典内容时可以根据目录查找到数据的存放位置,然后直接获 ...
- 终于AC了“最短路径”
今天做了一道关于最短路径的算法题,虽然最后AC了,但是我写的第一个算法,我认为是没有问题的,自己编写的测试用例也全部通过,反复调试了,都没有错误.可是在OJ上一提交就提示Wrong Answer,真是 ...