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. springmvc中的web.xml配置(包含中文乱码解决)

    <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http:// ...

  2. JavaScript 正则表达式(转自 mozilla)

    正则表达式是被用来匹配字符串中的字符组合的模式.在JavaScript中,正则表达式也是对象. 这种模式可以被用于 RegExp 的 exec 和 test 方法以及 String 的 match.r ...

  3. Angular JS中自定义标签 属性绑定的解释

    看到自定义标签的文档时,文档作者解释的能力实在太弱,也可能是本人太笨,一下绕不过来. 看了一个stackoverflow答案,才算明白,在此贴出翻译,以供大家参考. .csharpcode, .csh ...

  4. Android Could not find com.afollestad:material-dialogs:0.7.6.0 解决

    AS报错:Could not find com.afollestad:material-dialogs:0.7.6.0 网上没有解决方案: 解决: 将用: compile('com.afollesta ...

  5. python manage.py syncdb报错:No module named MySQLdb

    今天同步数据时出现这个错误: 解决方法: 1.先下载mysql-python 支持1.2.3-2.7版本 MySQL-python 1.2.3 for Windows and Python 2.7, ...

  6. 执行join_paired_ends.py报错Cannot find fastq-join

    通过 conda 安装 qiime 1后,在执行join_paired_ends.py时报错: burrito.util.ApplicationNotFoundError: Cannot find f ...

  7. JSONP 应用

    受限于浏览器的同源安全策略, js 无法发起跨域的请求. 但是 HTML 中的 <script> 标签却可以引入跨域的文件使用. 而 JSONP 就是利用 <script> 的 ...

  8. freemarker使用map替换ftl中相关值

    ftl文件demo01.ftl <html> <head> <title>Welcome!</title> </head> <body ...

  9. 模板—AC自动机

    #include<iostream> #include<cstdio> #include<cstring> using namespace std; struct ...

  10. kubeadmin 安装k8s集群

    系统设置 CentOS Linux release 7.6.1810 (Core) 修改主机名 vim /etc/hostname k8s-master hostname -F /etc/hostna ...