Codimd: using ''@'localhost' denied (mysql)

Created on 13 Sep 2018  路  4Comments  路  Source: hackmdio/codimd

are the settings for db or dbURL in config.json ignored?
it always uses no user and no password when doing npm start.

needs info question

Most helpful comment

npm start --production did it for me, thanks a lot! :)

All 4 comments

How do your settings look like?

config.json

{
        "production": {
                "domain": "mydomain.xyz",
                "urlPath": "notes",
                "host": "localhost",
                "port": 8090,
                "dbURL": "mysql://codimd:<password>@localhost:3306/codimd",
                "allowOrigin": ["localhost", "mydomain.xyz"],
                "allowAnonymousEdits": false,
                "defaultPermission": "private",
                "uploadsPath": "./public/uploads",
                "documentMaxLength": 67108864,
                "email": false,
                "allowEmailRegister": false
        }
}

tried to use

"db": {
    ...
}

instead of dbURL, too.

npm run build works fine and migration works, too.
npm start tells me it tries to use the db without user and password, and stucks in endless error reports then, one every 100ms.

Mhm to be honest, it looks fine to me. Do you start CodiMD with NODE_ENV=production?

Like NODE_ENV=production npm start?

Probably you want to start into production environment but didn't tell codimd to do so. so either use NODE_ENV=production npm start or npm start --production

npm start --production did it for me, thanks a lot! :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yaxu picture yaxu  路  4Comments

sagesharp picture sagesharp  路  4Comments

qiuwch picture qiuwch  路  3Comments

SISheogorath picture SISheogorath  路  4Comments

LukasKalbertodt picture LukasKalbertodt  路  4Comments