Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Directus ER_ACCESS_DENIED_ERROR: Access denied for user 'root'@'localhost' (using password: YES)

I’m trying to connect the CMS "Directus". But ervery time i try to do so i get this error

Error: ER_ACCESS_DENIED_ERROR: Access denied for user 'root'@'localhost' (using password: YES)
    at Handshake.Sequence._packetToError (C:\xampp\htdocs\directus\node_modules\mysql\lib\protocol\sequences\Sequence.js:47:14)
    at Handshake.ErrorPacket (C:\xampp\htdocs\directus\node_modules\mysql\lib\protocol\sequences\Handshake.js:123:18)
    at Protocol._parsePacket (C:\xampp\htdocs\directus\node_modules\mysql\lib\protocol\Protocol.js:291:23)
    at Parser._parsePacket (C:\xampp\htdocs\directus\node_modules\mysql\lib\protocol\Parser.js:433:10)
    at Parser.write (C:\xampp\htdocs\directus\node_modules\mysql\lib\protocol\Parser.js:43:10)
    at Protocol.write (C:\xampp\htdocs\directus\node_modules\mysql\lib\protocol\Protocol.js:38:16)
    at Socket.<anonymous> (C:\xampp\htdocs\directus\node_modules\mysql\lib\Connection.js:88:28)
    at Socket.<anonymous> (C:\xampp\htdocs\directus\node_modules\mysql\lib\Connection.js:526:10)
    at Socket.emit (node:events:390:28)
    at Socket.emit (node:domain:475:12)
    --------------------
    at Protocol._enqueue (C:\xampp\htdocs\directus\node_modules\mysql\lib\protocol\Protocol.js:144:48)
    at Protocol.handshake (C:\xampp\htdocs\directus\node_modules\mysql\lib\protocol\Protocol.js:51:23)
    at Connection.connect (C:\xampp\htdocs\directus\node_modules\mysql\lib\Connection.js:116:18)
    at C:\xampp\htdocs\directus\node_modules\knex\lib\dialects\mysql\index.js:66:18
    at new Promise (<anonymous>)
    at Client_MySQL.acquireRawConnection (C:\xampp\htdocs\directus\node_modules\knex\lib\dialects\mysql\index.js:61:12)
    at create (C:\xampp\htdocs\directus\node_modules\knex\lib\client.js:247:39)

I can’t really figure out waht the problem is.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

To change the default user password you will need to edit the config.inc.php file located in XAMMP/phpmyadmin/config.inc.php

From

$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';

To

$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'root';

Before you save the file, you will need update the password for root@localhost
enter image description here

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading