raghavgarg1257 / nodejs-mysql-boilerplate Goto Github PK
View Code? Open in Web Editor NEWA modular structured app to start you next nodejs project.
A modular structured app to start you next nodejs project.
Hi
I have this problem when running the command: npm run migrate-up
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
[email protected] migrate-down /home/namvh/Desktop/nodejs-mysql-boilerplate
DEBUG=knex:tx knex migrate:rollback
Error: ER_ACCESS_DENIED_ERROR: Access denied for user '{db namvh}'@'localhost' (using password: YES)
at Handshake.Sequence._packetToError (/home/namvh/Desktop/nodejs-mysql-boilerplate/node_modules/mysql/lib/protocol/sequences/Sequence.js:52:14)
at Handshake.ErrorPacket (/home/namvh/Desktop/nodejs-mysql-boilerplate/node_modules/mysql/lib/protocol/sequences/Handshake.js:130:18)
at Protocol._parsePacket (/home/namvh/Desktop/nodejs-mysql-boilerplate/node_modules/mysql/lib/protocol/Protocol.js:279:23)
at Parser.write (/home/namvh/Desktop/nodejs-mysql-boilerplate/node_modules/mysql/lib/protocol/Parser.js:76:12)
at Protocol.write (/home/namvh/Desktop/nodejs-mysql-boilerplate/node_modules/mysql/lib/protocol/Protocol.js:39:16)
at Socket. (/home/namvh/Desktop/nodejs-mysql-boilerplate/node_modules/mysql/lib/Connection.js:103:28)
at emitOne (events.js:96:13)
at Socket.emit (events.js:191:7)
at readableAddChunk (_stream_readable.js:178:18)
at Socket.Readable.push (_stream_readable.js:136:10)
at TCP.onread (net.js:561:20)
--------------------
at Protocol._enqueue (/home/namvh/Desktop/nodejs-mysql-boilerplate/node_modules/mysql/lib/protocol/Protocol.js:145:48)
at Protocol.handshake (/home/namvh/Desktop/nodejs-mysql-boilerplate/node_modules/mysql/lib/protocol/Protocol.js:52:23)
at Connection.connect (/home/namvh/Desktop/nodejs-mysql-boilerplate/node_modules/mysql/lib/Connection.js:130:18)
at /home/namvh/Desktop/nodejs-mysql-boilerplate/node_modules/knex/lib/dialects/mysql/index.js:106:18
at Promise._execute (/home/namvh/Desktop/nodejs-mysql-boilerplate/node_modules/bluebird/js/release/debuggability.js:303:9)
at Promise._resolveFromExecutor (/home/namvh/Desktop/nodejs-mysql-boilerplate/node_modules/bluebird/js/release/promise.js:483:18)
at new Promise (/home/namvh/Desktop/nodejs-mysql-boilerplate/node_modules/bluebird/js/release/promise.js:79:10)
at Client_MySQL.acquireRawConnection (/home/namvh/Desktop/nodejs-mysql-boilerplate/node_modules/knex/lib/dialects/mysql/index.js:104:12)
at Object.create (/home/namvh/Desktop/nodejs-mysql-boilerplate/node_modules/knex/lib/client.js:239:16)
at Pool._createResource (/home/namvh/Desktop/nodejs-mysql-boilerplate/node_modules/generic-pool/lib/generic-pool.js:354:17)
at Pool._ensureMinimum (/home/namvh/Desktop/nodejs-mysql-boilerplate/node_modules/generic-pool/lib/generic-pool.js:408:12)
at new Pool (/home/namvh/Desktop/nodejs-mysql-boilerplate/node_modules/generic-pool/lib/generic-pool.js:157:8)
at Client_MySQL.initializePool (/home/namvh/Desktop/nodejs-mysql-boilerplate/node_modules/knex/lib/client.js:269:17)
at Client_MySQL.Client (/home/namvh/Desktop/nodejs-mysql-boilerplate/node_modules/knex/lib/client.js:116:12)
at new Client_MySQL (/home/namvh/Desktop/nodejs-mysql-boilerplate/node_modules/knex/lib/dialects/mysql/index.js:62:20)
at Knex (/home/namvh/Desktop/nodejs-mysql-boilerplate/node_modules/knex/lib/index.js:60:34)
npm ERR! Linux 4.10.0-42-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "migrate-down"
npm ERR! node v7.10.1
npm ERR! npm v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] migrate-down: DEBUG=knex:tx knex migrate:rollback
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] migrate-down script 'DEBUG=knex:tx knex migrate:rollback'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the nodejs-mysql-boilerplate package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! DEBUG=knex:tx knex migrate:rollback
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs nodejs-mysql-boilerplate
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls nodejs-mysql-boilerplate
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /root/.npm/_logs/2018-01-10T16_00_57_779Z-debug.log
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
At first I put like this in .env.save file:
\ PORT = 8080
DB = {db server_HHC}
DB_USERNAME = {db root}
DB_PASSWORD = {db abc123!}
JWT_SECRET = anystring
It is also faulty.
I search on google, someone said: add new users to the database.
Next time I try to add new users to the database and try to change
\ PORT = 8080
DB = {db server_HHC}
DB_USERNAME = {db namvh}
DB_PASSWORD = {db abc456!}
JWT_SECRET = anystring
But it still fails as above.
Can you help me fix this problem?
thank you very much.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.