该问题的解决方案如下:

  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. luoguP1419 寻找段落(二分答案+单调队列)单调队列DP求在区间[l,r] 中长度至少为 m 的最大平均值

    模板:单调队列DP求在区间\([l,r]\) 中长度至少为 \(m\) 的最大平均值 题目链接:Here 题意 给定一个长度为 \(n\) 的序列 \(a_1\) ~ \(a_n\) ,从中选取一段长 ...

  2. echart相关

    https://www.bilibili.com/video/BV1bh41197p8?p=21&spm_id_from=pageDriver

  3. spring--Bean的作用域及应用场景

    这六种Spring Bean的作用域适用于不同的应用场景: Singleton: 在Spring IoC容器中仅存在一个Bean实例,Bean以单例方式存在.无论我们是否在配置文件中显式定义,所有的S ...

  4. MCU芯片架构设计

    目录 1.应用场景 主要是I2C\UART\SPI协议 2.Cortex-M3 MCU成本与工艺选型 按照晶圆进行收费,28nm,12寸晶圆,400万美金 晶圆是圆形的,die是方形的,会存在浪费 p ...

  5. 在TypeScript项目中搭配Axios封装后端接口调用

    前言 本来是想发 next.js 开发笔记的,结果发现里面涉及了太多东西,还是拆分出来发吧~ 本文记录一下在 TypeScript 项目里封装 axios 的过程,之前在开发 StarBlog-Adm ...

  6. [转帖]Strong crypto defaults in RHEL 8 and deprecation of weak crypto algorithms

    https://access.redhat.com/articles/3642912   TABLE OF CONTENTS What policies are provided? Removed c ...

  7. [转帖]sqluldr2 oracle直接导出数据为文本的小工具使用

    https://www.cnblogs.com/ocp-100/p/11098373.html 近期客户有需求,导出某些审计数据,供审计人进行核查,只能导出成文本或excel格式的进行查看,这里我们使 ...

  8. [转帖]Jmeter学习笔记(十七)——jmeter目录结构

      原文链接:http://www.cnblogs.com/zichuan/p/6938772.html 一.bin目录examples:  目录中有CSV样例 jmeter.bat  windows ...

  9. 【转帖】text-davinci-003和ChatGPT之间的不同点

    https://zhuanlan.zhihu.com/p/603709081 先看下GPT的发展时间线 InstructGPT(2022 年 1 月)是一系列 GPT-3 模型(包括 text-dav ...

  10. [转帖]DISK BUSY的理解误区

    前几天有个客户的系统存在性能问题,从AWR报告上我们看到是CPU使用率过高,同时GLOBAL CACHE方面的争用比较严重.系统中的烂SQL很多,数据库中很多几十GB的大表也没有分区,总之问题很多.不 ...