Ghost install fails with MariaDB "ER_NOT_SUPPORTED_AUTH_MODE"

If you’re looking for some help, it’s important to provide as much context as possible so that people are able to assist you. Try to always mention:

  • What’s your URL? This is the easiest way for others to debug your issue
    Not live yet
  • What version of Ghost are you using?
    2.21.1
  • What configuration?
    Debug Information:
    OS: Ubuntu, v18.04
    Node Version: v8.16.0
    Ghost-CLI Version: 1.10.0
    Environment: production
    Command: ‘ghost setup’
    Nginx: 1.16.0
    MariaDB: 10.1.38
  • What browser?
    Not applicable
  • What errors or information do you see in the console?
    :heavy_multiplication_x: Starting Ghost
    A GhostError occurred.
    Message: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MariaDB client
    Help: Unknown database error
    Suggestion: journalctl -u ghost_plimbalandala-ro -n 50
  • What steps could someone else take to reproduce the issue you’re having?
    Install Ghost on a DO droplet starting from a vanilla Ubuntu 18.04 image, using root as mysql user (not creating a dedicated ghost mysql user). Trying to add a ghost mysql user generates this error: Error trying to connect to the MySQL database (though the root credentials are correct, database exists, etc.).

The suggested command shows lots of lines like the ones below:

  • Logs begin at Thu 2019-05-02 20:52:24 EEST, end at Thu 2019-05-02 22:22:07 EEST. –
    May 02 22:22:06 web.tigros.ro node[10757]: at Promise._settlePromiseFromHandler (/var/www/plimbalandala.ro/versions/2.21.1/node_mod
    May 02 22:22:06 web.tigros.ro node[10757]: at Promise._settlePromise (/var/www/plimbalandala.ro/versions/2.21.1/node_modules/bluebi
    May 02 22:22:06 web.tigros.ro node[10757]: at Promise._settlePromise0 (/var/www/plimbalandala.ro/versions/2.21.1/node_modules/blueb
    May 02 22:22:06 web.tigros.ro node[10757]: at Promise._settlePromises (/var/www/plimbalandala.ro/versions/2.21.1/node_modules/blueb
    May 02 22:22:06 web.tigros.ro node[10757]: at _drainQueueStep (/var/www/plimbalandala.ro/versions/2.21.1/node_modules/bluebird/js/r
    May 02 22:22:06 web.tigros.ro node[10757]: at _drainQueue (/var/www/plimbalandala.ro/versions/2.21.1/node_modules/bluebird/js/relea
    May 02 22:22:06 web.tigros.ro node[10757]: at Async._drainQueues (/var/www/plimbalandala.ro/versions/2.21.1/node_modules/bluebird/j
    May 02 22:22:06 web.tigros.ro node[10757]: at Immediate.Async.drainQueues (/var/www/plimbalandala.ro/versions/2.21.1/node_modules/b
    May 02 22:22:06 web.tigros.ro node[10757]: at runCallback (timers.js:810:20)
    May 02 22:22:06 web.tigros.ro node[10757]: at tryOnImmediate (timers.js:768:5)
    May 02 22:22:06 web.tigros.ro node[10757]: at processImmediate [as _immediateCallback] (timers.js:745:5)
    May 02 22:22:06 web.tigros.ro node[10757]: Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested
    May 02 22:22:06 web.tigros.ro node[10757]: at Handshake.Sequence._packetToError (/var/www/plimbalandala.ro/versions/2.21.1/node_mod
    May 02 22:22:06 web.tigros.ro node[10757]: at Handshake.ErrorPacket (/var/www/plimbalandala.ro/versions/2.21.1/node_modules/mysql/l
    May 02 22:22:06 web.tigros.ro node[10757]: at Protocol._parsePacket (/var/www/plimbalandala.ro/versions/2.21.1/node_modules/mysql/l
    May 02 22:22:06 web.tigros.ro node[10757]: at Parser.write (/var/www/plimbalandala.ro/versions/2.21.1/node_modules/mysql/lib/protoc
    May 02 22:22:06 web.tigros.ro node[10757]: at Protocol.write (/var/www/plimbalandala.ro/versions/2.21.1/node_modules/mysql/lib/prot
    May 02 22:22:06 web.tigros.ro node[10757]: at Socket. (/var/www/plimbalandala.ro/versions/2.21.1/node_modules/mysql/lib/
    May 02 22:22:06 web.tigros.ro node[10757]: at Socket. (/var/www/plimbalandala.ro/versions/2.21.1/node_modules/mysql/lib/
    May 02 22:22:06 web.tigros.ro node[10757]: at emitOne (events.js:116:13)
    May 02 22:22:06 web.tigros.ro node[10757]: at Socket.emit (events.js:211:7)
    May 02 22:22:06 web.tigros.ro node[10757]: at addChunk (_stream_readable.js:263:12)
    May 02 22:22:06 web.tigros.ro node[10757]: at readableAddChunk (_stream_readable.js:250:11)
    May 02 22:22:06 web.tigros.ro node[10757]: at Socket.Readable.push (_stream_readable.js:208:10)
    May 02 22:22:06 web.tigros.ro node[10757]: at TCP.onread (net.js:601:20)
    May 02 22:22:06 web.tigros.ro node[10757]: --------------------
    May 02 22:22:06 web.tigros.ro node[10757]: at Protocol._enqueue (/var/www/plimbalandala.ro/versions/2.21.1/node_modules/mysql/lib/p
    May 02 22:22:06 web.tigros.ro node[10757]: at Protocol.handshake (/var/www/plimbalandala.ro/versions/2.21.1/node_modules/mysql/lib/
    May 02 22:22:06 web.tigros.ro node[10757]: at Connection.connect (/var/www/plimbalandala.ro/versions/2.21.1/node_modules/mysql/lib/
    May 02 22:22:06 web.tigros.ro node[10757]: at _bluebird.default (/var/www/plimbalandala.ro/versions/2.21.1/node_modules/knex-migrat
    May 02 22:22:06 web.tigros.ro node[10757]: at Promise._execute (/var/www/plimbalandala.ro/versions/2.21.1/node_modules/bluebird/js/
    May 02 22:22:06 web.tigros.ro node[10757]: at Promise._resolveFromExecutor (/var/www/plimbalandala.ro/versions/2.21.1/node_modules/
    May 02 22:22:06 web.tigros.ro node[10757]: at new Promise (/var/www/plimbalandala.ro/versions/2.21.1/node_modules/bluebird/js/relea
    May 02 22:22:06 web.tigros.ro node[10757]: at Client_MySQL.acquireRawConnection (/var/www/plimbalandala.ro/versions/2.21.1/node_mod
    May 02 22:22:06 web.tigros.ro node[10757]: at create (/var/www/plimbalandala.ro/versions/2.21.1/node_modules/knex-migrator/node_mod
    May 02 22:22:06 web.tigros.ro node[10757]: at tryPromise (/var/www/plimbalandala.ro/versions/2.21.1/node_modules/tarn/lib/Pool.js:3
    May 02 22:22:06 web.tigros.ro node[10757]: at tryPromise (/var/www/plimbalandala.ro/versions/2.21.1/node_modules/tarn/lib/utils.js:
    May 02 22:22:06 web.tigros.ro node[10757]: at Promise (/var/www/plimbalandala.ro/versions/2.21.1/node_modules/tarn/lib/Pool.js:366:
    May 02 22:22:06 web.tigros.ro node[10757]: at Promise._execute (/var/www/plimbalandala.ro/versions/2.21.1/node_modules/bluebird/js/
    May 02 22:22:06 web.tigros.ro node[10757]: at Promise._resolveFromExecutor (/var/www/plimbalandala.ro/versions/2.21.1/node_modules/
    May 02 22:22:06 web.tigros.ro node[10757]: at new Promise (/var/www/plimbalandala.ro/versions/2.21.1/node_modules/bluebird/js/relea
    May 02 22:22:06 web.tigros.ro node[10757]: at callbackOrPromise (/var/www/plimbalandala.ro/versions/2.21.1/node_modules/tarn/lib/Po
    May 02 22:22:06 web.tigros.ro node[10757]:
    May 02 22:22:07 web.tigros.ro node[10757]: /usr/lib/node_modules/ghost-cli/lib/process-manager.js:58
    May 02 22:22:07 web.tigros.ro node[10757]: throw error;
    May 02 22:22:07 web.tigros.ro node[10757]: ^
    May 02 22:22:07 web.tigros.ro node[10757]: [object Object]
    May 02 22:22:07 web.tigros.ro systemd[1]: ghost_plimbalandala-ro.service: Main process exited, code=exited, status=1/FAILURE
    May 02 22:22:07 web.tigros.ro systemd[1]: ghost_plimbalandala-ro.service: Failed with result ‘exit-code’.
    May 02 22:22:07 web.tigros.ro systemd[1]: Stopped Ghost systemd service for blog: plimbalandala-ro.

Any ideas what the issue could be? Searched forums and docs, but didn’t find a clue. Thanks!

Hey :wave:
You might want to check out this thread: Error: ER_NOT_SUPPORTED_AUTH_MODE with auth_socket · Issue #1507 · mysqljs/mysql · GitHub

and take a look at the auth plugins on the users in the mysql db.

1 Like

Thanks! That worked!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.