该问题的解决方案如下:

  1. win+R 输入cmd
  2. mysql -u root -p 输入密码进入到mysql

    3.执行sql语句,将密码改成123456(自己可以记住的密码即可)
alter user 'root'@'localhost' identified with mysql_native_password by '123456';

4.再执行sql语句

flush privileges;

5.然后退出数据库

6.重新启动node服务

nodejs连接mysql报错:throw err; // Rethrow non-MySQL errors TypeError: Cannot read property 'query' of undefined的更多相关文章

  1. node.js报错throw err; // Rethrow non-MySQL errors e:\serverTest\node_modules\mysql\lib\protocol\Parser.js:79 解决方法

    今天在用node+angular做后台时,需要使用session保存登陆状态的时候,遇到了此问题,问题直译为非mysql问题,我也在后台取到的登陆用户名和密码,确实不是数据库问题.最后发现在使用ses ...

  2. Node中使用MySQL报错:TypeError: Cannot read property 'query' of undefined

    Node中使用MySQL报错: TypeError: Cannot read property 'query' of undefined at /Users/sipeng/Desktop/彭思/201 ...

  3. 连接mysql报错-Can't connect to MySQL server on

    1.问题: 在Windows 上远程连接数据库报错-Can't connect to MySQL server on... 但是重启系统后就可以连接: 2.这种原因大致是因为系统缓冲区空间不足或列队已 ...

  4. pycharm pymysql连接mysql 报错 pymysql.err.InterfaceError: (0, '')

    pycharm  pymysql连接mysql  执行MySQL操作遇到以下报错信息: conn.query(q) File "C:\Software\Python37\lib\site-p ...

  5. 连接 MySQL 报错:Lost connection to MySQL server at 'reading authorization packet', system error: 34

    报错信息: Lost connection to MySQL server at 解决方案: use mysql; ; flush privileges; 参考: https://blog.csdn. ...

  6. MySQL 报错:[Err] 1071 - Specified key was too long; max key length is 767 bytes

    [Err] 1071 - Specified key was too long; max key length is 767 bytes 这个会出现在MySQ5.7以下版本 因为没有启用innodb_ ...

  7. 【mysql报错】[Err] 1248 - Every derived table must have its own alias

    当我运行一条联合查询的sql语句时报如下错误: [Err] 1248 - Every derived table must have its own alias,大概意思是每一张派生表必须要有自己的别 ...

  8. mysql报错: 1548-Cannot load from mysql.proc. The table is probably corrupted 解决办法

    use mysql: ALTER TABLE `proc` MODIFY COLUMN `comment` text CHARACTER SET utf8 COLLATE utf8_bin NOT N ...

  9. Vue.js搭建路由报错 router.map is not a function,Cannot read property ‘component’ of undefined

    错误: 解决办法: 2.0已经没有map了,使用npm install vue-router@0.7.13 命令兼容1.0版本vue 但是安装完之后会出现一个错误: Cannot read prope ...

  10. 解决MySQL报错:1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'informat

    解决MySQL报错:1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'informat ...

随机推荐

  1. leaflet marker 旋转

    leaflet.markerRotation.js 代码(这段代码是从插件 leaflet.polylineDecorator.js 中复制的): // leaflet 实现 marker 旋转 (f ...

  2. AtCoder Regular Contest 123 (A~C 三道好题)

    比赛链接:Here A - Arithmetic Sequence (good) 注意细节 int main() { cin.tie(nullptr)->sync_with_stdio(fals ...

  3. 【每日一题】29.maze (BFS 进阶)

    补题链接:Here 本题代码由贺佬完成 这道题基本算一道 BFS 进阶题,有少许细节要小心 (WA1发.. #include <bits/stdc++.h> #define x first ...

  4. 30例 | 一文搞懂python日期时间处理

    前言 datetime是python的内置模块,用来处理日期和时间. 该模块常用的类有: 类名 功能说明 date 日期对象 time 时间对象 datetime 日期时间对象 timedelta 时 ...

  5. P2241

    这么多年不写代码,竟然忘了longlong这茬,我半天没想明白错在哪里,过了好久才反应过来.浪费不少时间,真的得记住longlong 啊.... Code #include <iostream& ...

  6. HP笔记本(Inspiron 7472) 视频时无摄像头的处理方案

    需要视频考试的前一天,测试摄像头时发现微信视频时竟然摄像头打不开.比较焦急,尝试了好几种办法,并在2小时内找出解决方案.   一.查看设备是否被禁用 我的电脑->右键->设备管理器-> ...

  7. 17-三态门(TSL)

    三态门(TSL) 普通的逻辑电路只有两个状态,还有一个高阻态. EN是高电平1 A,B,EN之间的关系是与的关系,当EN为1得时候,EN就不起作用了,输入由A,B决定.EN端为高电平,所以二极管D2截 ...

  8. Go-测试-testing

  9. Nginx长连接学习之二

    Nginx长连接学习之二 背景 距离最开始学习Nginx的长连接已经一年半; 距离最开始学习Linux的TCP内核参数也已经过去了一年. 最近产品再次出现了TCP链接相关的问题. 因为一开始不知道部署 ...

  10. [转帖]Windows下sc create命令行注册服务

    https://www.cnblogs.com/li150dan/p/15603149.html 如何将exe注册为windows服务,让其直接从后台运行 方法一:使用windows自带的命令sc,首 ...