我在MySQL数据库上为我的用户输入密码后无法连接到Magento。我该如何解决这个问题?
Error: SQLSTATE[HY000] [1045] Access denied for user 'xxx'@'localhost' (using password: YES).
我尝试删除密码但没有成功,只需转到phpMyAdmin并在SQL中的数据库上运行此命令
SET PASSWORD FOR 'xxx_username'@'localhost' = PASSWORD('');
我收到了这个错误:
#1044 - Access denied for user 'xxx'@'localhost' to database 'mysql'
如何在Magento上更新此密码?或者从数据库中删除它?
答案 0 :(得分:4)
这是一个两步的过程。首先,在以下文件/位置配置Magento数据库凭据
<!-- File: app/etc/local.xml -->
<connection>
<host><![CDATA[server_name]]></host>
<username><![CDATA[username]]></username>
<password><![CDATA[password]]></password>
<dbname><![CDATA[schema_name]]></dbname>
<active>1</active>
</connection>
第二步是清除Magento缓存。 Magento缓存其配置文件,因此无需在每个请求中从磁盘加载它们。在标准设置中,您可以通过删除以下目录中的任何文件/文件夹来清除缓存
var/cache/...
但是,如果您的系统已对其执行了其他扩展工作,则可能需要手动刷新其他缓存系统。