macopedia / magmi-m2

Magmi GitHub, see branch magento2 for a version compatible with Magento 2
113 stars 53 forks source link

Fatal error: Uncaught PDOException: SQLSTATE[HY000] [1045] Access denied for user ''@'localhost' (using password: #62

Open alaldin opened 5 years ago

alaldin commented 5 years ago

Hello, I downloaded the zip files; I managed to get Magmi to work on M2 but now I get the below error. I have searched high and low and even changed the DB user/pass but still, I can't get rid of the error. How did

Fatal error: Uncaught PDOException: SQLSTATE[HY000] [1045] Access denied for user ''@'localhost' (using password: NO) in /home//public_html/magmi/inc/dbhelper.class.php:58 Stack trace: #0 /home//public_html/magmi/inc/dbhelper.class.php(58): PDO->__construct('mysql:host=loca...', NULL, NULL, Array) #1 /home//public_html/magmi/inc/magmi_engine.php(518): DBHelper->initDb('localhost', 'magento', NULL, NULL, '3306', NULL, 'net', false) #2 /home//public_html/magmi/plugins/base/general/reindex/magmi_reindexing_plugin.php(35): Magmi_Engine->connectToMagento() #3 /home//public_html/magmi/plugins/base/general/reindex/magmi_reindexing_plugin.php(105): Magmi_ReindexingPlugin->initIndexList() #4 /home//public_html/magmi/plugins/base/general/reindex/options_panel.php(20): Magmi_ReindexingPlugin->getIndexList() #5 /home//public_html/magmi/plugins/inc/magmi_plugin.php(95): require('/home/...') #6 /home//public_html/mag in /home//public_html/magmi/inc/dbhelper.class.php on line 58

serik303 commented 4 years ago

google search https://magento.stackexchange.com/questions/208225/how-do-i-install-the-magmi-for-magento-2-extension

go to magmi/inc/magmi_engine.php replace the one 511 line and replace else code and add you credential

else { $host = $this->getProp("DATABASE", "host", "localhost"); $dbname = $this->getProp("DATABASE", "dbname", "magento"); $user = $this->getProp("DATABASE", "user",'root'); $pass = $this->getProp("DATABASE", "password",'root'); $port = $this->getProp("DATABASE", "port", "3306"); }

tmotyl commented 4 years ago

Can you please send a pull request?

websiteni commented 4 years ago

I tried adding the database credentials to magmi_engine.php, but it didn't make any different. I'm still getting this error