Hello Python
Hello Python

Reputation: 120

Magento database connection issue with no database password

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.

Upvotes: 0

Views: 1064

Answers (2)

Hello Python
Hello Python

Reputation: 120

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.

Upvotes: 1

Amit Bera
Amit Bera

Reputation: 7611

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>

Upvotes: 0

Related Questions