我能够从SQLyog连接数据库,但是当从Node.js连接时会出现以下错误:
数据库IP : 10.0.0.200
Error when connecting to db: { Error: ER_DBACCESS_DENIED_ERROR: Access denied for user 'myuser'@'10.0.0.100' to database 'db_new'
at Handshake.Sequence._packetToError (\node_modules\mysql\lib\protocol\sequences\Sequenc
我在一段时间之前设置了我的数据库服务器,并且我的节点web服务器连接得很好。在我的dbcommon.js文件中,我有以下内容。
var credentials = require('./db_access');
var mysql = require('mysql');
//Use this function to grab a thread from the db thread pool and connect to the db. Then it queries the db with the sql statement passed to it.
ex