Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tips on setting permissions for database? #25

Open
sdwfrost opened this issue May 8, 2020 · 1 comment
Open

Tips on setting permissions for database? #25

sdwfrost opened this issue May 8, 2020 · 1 comment

Comments

@sdwfrost
Copy link

sdwfrost commented May 8, 2020

Do you have any guidance on the following error? Is it because:

  • There is an issue with the user, or
  • I need to set some permissions somewhere
$ script/db-create
Starting web-ui_db_1 ... done
[ERROR] AssertionError [ERR_ASSERTION]: ifError got unwanted exception: ER_DBACCESS_DENIED_ERROR: Access denied for user 'user'@'%' to database 'web-ui'
    at /app/node_modules/db-migrate/lib/commands/db.js:17:12
    at /app/node_modules/db-migrate/lib/driver/index.js:95:9
    at Handshake.<anonymous> (/app/node_modules/db-migrate-mysql/index.js:510:14)
    at Handshake.<anonymous> (/app/node_modules/mysql/lib/Connection.js:526:10)
    at Handshake._callback (/app/node_modules/mysql/lib/Connection.js:488:16)
    at Handshake.Sequence.end (/app/node_modules/mysql/lib/protocol/sequences/Sequence.js:83:24)
    at Handshake.ErrorPacket (/app/node_modules/mysql/lib/protocol/sequences/Handshake.js:125:8)
    at Handshake.Sequence._packetToError (/app/node_modules/mysql/lib/protocol/sequences/Sequence.js:47:14)
    at Handshake.ErrorPacket (/app/node_modules/mysql/lib/protocol/sequences/Handshake.js:123:18)
    at Protocol._parsePacket (/app/node_modules/mysql/lib/protocol/Protocol.js:291:23)
    at Parser._parsePacket (/app/node_modules/mysql/lib/protocol/Parser.js:433:10)
    at Parser.write (/app/node_modules/mysql/lib/protocol/Parser.js:43:10)
    at Protocol.write (/app/node_modules/mysql/lib/protocol/Protocol.js:38:16)
    at Socket.<anonymous> (/app/node_modules/mysql/lib/Connection.js:88:28)
    at Socket.<anonymous> (/app/node_modules/mysql/lib/Connection.js:526:10)
    at Socket.emit (events.js:315:20)
    at addChunk (_stream_readable.js:297:12)
    at readableAddChunk (_stream_readable.js:273:9)
    at Socket.Readable.push (_stream_readable.js:214:10)
    at TCP.onStreamRead (internal/stream_base_commons.js:186:23)
    --------------------
    at Protocol._enqueue (/app/node_modules/mysql/lib/protocol/Protocol.js:144:48)
    at Protocol.handshake (/app/node_modules/mysql/lib/protocol/Protocol.js:51:23)
    at Connection.connect (/app/node_modules/mysql/lib/Connection.js:116:18)
    at Object.exports.connect (/app/node_modules/db-migrate-mysql/index.js:508:6)
    at connect (/app/node_modules/db-migrate/lib/driver/index.js:93:12)
    at Object.exports.connect (/app/node_modules/db-migrate/lib/driver/index.js:134:5)
    at Object.exports.driver (/app/node_modules/db-migrate/connect.js:120:10)
    at executeDB (/app/node_modules/db-migrate/lib/commands/db.js:16:9)
    at run (/app/node_modules/db-migrate/lib/commands/run.js:86:19)
    at dbmigrate.run (/app/node_modules/db-migrate/api.js:466:16)
    at /app/node_modules/db-migrate/bin/db-migrate:36:19
    at tryCatcher (/app/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/app/node_modules/bluebird/js/release/promise.js:547:31)
    at Promise._settlePromise (/app/node_modules/bluebird/js/release/promise.js:604:18)
    at Promise._settlePromise0 (/app/node_modules/bluebird/js/release/promise.js:649:10)
    at Promise._settlePromises (/app/node_modules/bluebird/js/release/promise.js:729:18)
@aeisenberg
Copy link
Contributor

Sorry to hear you're having trouble. Did you by any chance change to a non-default user/pass/host for the database? Could you try running with:

DB_USERNAME=user
DB_PASSWORD=password
DB_HOST=localhost

I think we're not set up for anything non-default here. Please get back to me either way so I can update the docs.

Also, if you continue to have problems, please ping me by email and I can help you through this. We have just opened up and are still working out how best to facilitate external contributions. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants