Question

I am trying to set up my magento site on my local dev server. I have installed database and copied files from live server and changed settings in local.xml file.

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. getting below error -

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

below are my setting for 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.

No correct solution

OTHER TIPS

After struggling for 2-3 hrs I got, other local_bkp.xml file was creating issue here. That I have that kept here(etc/app/ folder) for backup.

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.

Thanks to all for your time.

Python, you did not put the database user password ,so please put the password of database user password . If password id then it will be <password><![CDATA[password]]></password>

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top