mysql登陆出现这个错误时,解决方法如下:

1. 修改mysql配置文件,增加 skip-grant-tables

如我的机器是linux 所以要修改/etc/mysql/my.cnf 在mysqld下增加skip-grant-tables。 这是为了让root可以不用密码登陆

2. 重启mysql

/etc/init.d/mysql restart

3. 无密码登陆

mysql -u root -p

在弹出输入密码的时候回车即可

4. 更改root密码

mysql> use mysql;

mysql> update user set password=password("root1234") where user="root";

mysql> flush privileges;
5. 修改配置文件去掉skip-grant-tables

6. 重启mysql 即可用新密码登陆 。

ERROR 1045 (28000)的更多相关文章

  1. 关于mysql ERROR 1045 (28000)错误的解决办法

    错误情景: 使用Navicat打开mysql的时候弹出错误框 错误代码: ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' ( ...

  2. Linux mysql 5.6: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

    案例环境: 操作系统 :Red Hat Enterprise Linux Server release 5.7 (Tikanga) 64 bit 数据库版本 : Mysql 5.6.19 64 bit ...

  3. 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 ...

  4. 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 都可以使用这个方法 ...

  5. mysql ERROR 1045 (28000): 错误解决办法

    ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: NO) ERROR 1045 (28000 ...

  6. 升级到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' ...

  7. 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: YES)) 修改: # ...

  8. 关于mysql登录异常处理方法 - mysql ERROR 1045 (28000)

    今天在开发过程中遇到了一个很令人头痛的问题?? 使用 百度经验的步骤 [http://jingyan.baidu.com/article/495ba841ef412d38b30edeb2.html]修 ...

  9. 安装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 ...

  10. MySQL5.5出面ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)问题的解决办法

    问题描述 安装完MySQL5.5数据库,使用Navicat Premium以及命令窗口连接数据库都报以下错误: ERROR 1045 (28000): Access denied for user ' ...

随机推荐

  1. 题解报告:hdu 1035 Robot Motion(简单搜索一遍)

    Problem Description A robot has been programmed to follow the instructions in its path. Instructions ...

  2. Tomcat6和7版本对web.xml中taglib标签的配置差异

    原来部署在Tomcat6中的应用在Tomcat7中运行时报错如下错误: java.lang.IllegalArgumentException: taglib definition not consis ...

  3. Oracle取查询结果数据的第一条记录SQL

    Oracle取查询结果数据的第一条记录SQL: ; ;

  4. 有符号char转无符号short

    ; cout<<(int)ch<<endl; //-1 unsigned short d = ch; short dd = ch; cout<<d<<e ...

  5. Spring Boot (32) Lock 本地锁

    平时开发中,有时会双击提交表单造成重复提交,或者网速比较慢时还没有响应又点击了按钮,我们在开发中必须防止重复提交 一般在前台进行处理,定义个变量,发送请求前判断变量值为true,然后把变量设置为fal ...

  6. kill 8080 port on windows

    1. 查找PID netstat -ano | findstr :yourPortNumber 2. kill进程 taskkill /PID typeyourPIDhere /F

  7. 【C++】Item34.区分接口继承和实现继承

    区分接口继承和实现继承 类包含的成员函数种类 1.静态函数 2.非静态函数 2.1 普通函数(非虚) non-virtual 2.2 虚函数 2.2.1 纯虚函数 pure-virtual 2.2.2 ...

  8. android调用webservice接口获取信息

    我的有一篇博客上讲了如何基于CXF搭建webservice,service层的接口会被部署到tomcat上,这一篇我就讲一下如何在安卓中调用这些接口传递参数. 1.在lib中放入ksoap2的jar包 ...

  9. Django基础之admin功能

    Django默认开起了后台 1.访问admin后台 2.用户和密码进行登录 ============================================================== ...

  10. 你的宽带ip地址被100.64了吗?

    你的宽带ip地址被100.64了吗?   最近需要用外网的时候发现,宿舍路由wan口的ip变成了100.64.X.X,本以为是一个外网的ip,可事实上并不是,并且从外网无法直接访问.   首先,我们都 ...