简体   繁体   English

Magento数据库连接问题,没有数据库密码

[英]Magento database connection issue with no database password

I am trying to set up my magento site on my local dev server. 我正在尝试在本地开发服务器上设置我的magento网站。 I have installed database and copied files from live server and changed settings in local.xml file. 我已经安装了数据库并从实时服务器复制了文件,并更改了local.xml文件中的设置。

On my local server I have no password for database user. 在我的本地服务器上,我没有数据库用户的密码。 Everything is ok with local.xml but still I am not able to connect with database. local.xml一切正常,但是仍然无法连接数据库。 getting below error - 低于错误-

SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: YES)

below are my setting for local.xml 以下是我对local.xml的设置

<connection>
            <host><![CDATA[localhost]]></host>
            <username><![CDATA[root]]></username>
            <password><![CDATA[]]></password>
            <dbname><![CDATA[mydbname]]></dbname>
            <initStatements><![CDATA[SET NAMES utf8]]></initStatements>
            <model><![CDATA[mysql4]]></model>
            <type><![CDATA[pdo_mysql]]></type>
            <pdoType><![CDATA[]]></pdoType>
            <active>1</active>
</connection>

What can be issue ? 有什么问题? Any help please. 请帮忙。

Thanks in advance. 提前致谢。

After struggling for 2-3 hrs I got, other local_bkp.xml file was creating issue here. 我挣扎了2-3个小时后,其他local_bkp.xml文件在这里产生了问题。 That I have that kept here(etc/app/ folder) for backup. 我已将其保存在此处(etc / app /文件夹)进行备份。

I don't know why magneto was taking credentials form that bkp file instead on actual local.xml file, but once I have removed backup file from there it worked. 我不知道为什么磁石从实际的local.xml文件中取bkp文件的凭据,但是一旦我从那里删除了备份文件,它就起作用了。

Thanks to all for your time. 感谢您的时间。

Python, you did not put the database user password ,so please put the password of database user password . Python,您没有输入数据库用户密码,因此请输入数据库用户密码。 If password id then it will be <password><![CDATA[password]]></password> 如果输入密码,则为<password><![CDATA[password]]></password>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM