mysql - SQLSTATE[28000] [1045] (Magento) Access denied for user .. (but new PDO, works in test program) -
i copied magento store provider , installed database. nothing special.
with testing error mysql database:
sqlstate[28000] [1045] access denied user ‘xx’@’localhost’ (using password: yes)
i found program /httpdocs/lib/zend/db/adapter/pdo/abstract.php
, has statement:
try { $this->_connection = new pdo( $dsn, $this->_config[’username’], $this->_config[’password’], $this->_config[’driver_options’] );
if use same statement same settings in short test program on same server, connection works.
how possible? there in pdo different working while called in magento?
i forgot write, domain has shared ip address , domain name (but no dns yet), coupled ip address domain name in windows hosts file. domain www.xxxx.com exists on internet already, use xxxx.com in windows host file coupled shared ip address. in way tested new websites without transferred domain yet.
when copy own server (localhost.com magento), have find it, works well. has situation @ provider ... why working in own test program pdo same settings ?
$dsn = mysql:model=mysql4;initstatements=set names utf8;type=pdo_mysql;host=localhost;dbname=xxxx;active=1
did try :
grant privileges on *.* 'root'@'localhost' identified 'your_password' grant option; flush privileges;
or
grant privileges on your_database.* 'user_name'@'localhost' identified 'your_password' grant option;
if specified bind address in my.cnf file ip address, should use ip address instead of localhost
Comments
Post a Comment