SequelizeConnectionError: Client does not support authentication protocol requested by server; consider upgrading MariaDB client

Iman Namvar picture Iman Namvar · Jul 12, 2017 · Viewed 11.2k times · Source

I'm using Sequelize version 4.3.0 on nodejs(v6.11.0) application having Mariadb (mysql Ver 15.1 Distrib 10.0.29-MariaDB, for debian-linux-gnu (i686) using readline 5.2 ) on Ubuntu 16.04. when application starts and calls function: Sequelize.sync(); Then sequelize connection manager throws following error:

Unhandled rejection SequelizeConnectionError: Client does not support authentication protocol requested by server; consider upgrading MariaDB client

at Utils.Promise.tap.then.catch.err (/home/dariksoft/cars/node_modules/sequelize/lib/dialects/mysql/connection-manager.js:146:17)
at tryCatcher (/home/dariksoft/cars/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/home/dariksoft/cars/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/home/dariksoft/cars/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/home/dariksoft/cars/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/home/dariksoft/cars/node_modules/bluebird/js/release/promise.js:689:18)
at Async._drainQueue (/home/dariksoft/cars/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/home/dariksoft/cars/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues (/home/dariksoft/cars/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:672:20)
at tryOnImmediate (timers.js:645:5)
at processImmediate [as _immediateCallback] (timers.js:617:5)

I updated mariadb-server and mariadb-client but the problem already exists!

Anyone can help me to solve this problem ?

Answer

Iman Namvar picture Iman Namvar · Jul 12, 2017

I found the answer:

login to mysql command line and write the following commands:

use mysql;

update user set authentication_string=password(''),plugin='mysql_native_password' where user='root';