0

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.

2 Answers 2

1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

Python...,yes ,this type of issue ,was occurred once in my life :)
0

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>

1 Comment

Thanks Amit, But I already wrote that there is no password. Anyway, I got the solution and answered here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.