Directus ER_ACCESS_DENIED_ERROR: Access denied for user 'root'@'localhost' (using password: YES)
Directus ER_ACCESS_DENIED_ERROR: Access denied for user 'root'@'localhost' (using password: YES)
我正在尝试连接 CMS“Directus”。但每次我尝试这样做时,我都会收到此错误
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)
我实在想不通是什么问题。
要更改默认用户密码,您需要编辑位于 XAMMP/phpmyadmin/config.inc.php
中的 config.inc.php
文件
来自
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
至
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'root';
在保存文件之前,您需要更新 root@localhost 的密码
我正在尝试连接 CMS“Directus”。但每次我尝试这样做时,我都会收到此错误
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)
我实在想不通是什么问题。
要更改默认用户密码,您需要编辑位于 XAMMP/phpmyadmin/config.inc.php
config.inc.php
文件
来自
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
至
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'root';
在保存文件之前,您需要更新 root@localhost 的密码