direct-assemblee / DirectAssemblee-scraper

Direct Assemblée scraper web application
GNU Affero General Public License v3.0
4 stars 2 forks source link

Access denied : MySQL configuration #2

Open domi41 opened 5 years ago

domi41 commented 5 years ago

sails lift


Error: ER_ACCESS_DENIED_ERROR: Access denied for user 'root'@'localhost' (using password: NO)
    at Handshake.Sequence._packetToError (/home/domi/palace/code/snd/DirectAssemblee-scraper/node_modules/mysql/lib/protocol/sequences/Sequence.js:52:14)
    at Handshake.ErrorPacket (/home/domi/palace/code/snd/DirectAssemblee-scraper/node_modules/mysql/lib/protocol/sequences/Handshake.js:130:18)
    at Protocol._parsePacket (/home/domi/palace/code/snd/DirectAssemblee-scraper/node_modules/mysql/lib/protocol/Protocol.js:279:23)
    at Parser.write (/home/domi/palace/code/snd/DirectAssemblee-scraper/node_modules/mysql/lib/protocol/Parser.js:76:12)
    at Protocol.write (/home/domi/palace/code/snd/DirectAssemblee-scraper/node_modules/mysql/lib/protocol/Protocol.js:39:16)
    at Socket.<anonymous> (/home/domi/palace/code/snd/DirectAssemblee-scraper/node_modules/mysql/lib/Connection.js:103:28)
    at Socket.emit (events.js:197:13)
    at Socket.EventEmitter.emit (domain.js:446:20)
    at addChunk (_stream_readable.js:288:12)
    at readableAddChunk (_stream_readable.js:269:11)
    at Socket.Readable.push (_stream_readable.js:224:10)
    at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:145:17)

Do we have to run it as root ?

domi41 commented 5 years ago

Never mind this spam, it's only asking for a MySQL authentication.

I'll turn my keyboard seven times in my mouth from now on. :)

domi41 commented 5 years ago

Sourcing this did the trick.

export DATABASE_HOST="localhost"
export DATABASE_PORT=3306
export DATABASE_USER="root"
# Careful, if you use root, both MUST be set to the correct value
export DATABASE_PASSWORD=""
export DATABASE_ROOT_PASSWORD=""
export DATABASE_NAME="directassemblee"

I've added some breadcrumbs to the readme, should I MR?

moplat commented 5 years ago

Hi again @domi41, Feel free to MR :)