Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
alaldin opened this issue Oct 26, 2019 · 3 comments

Comments

@alaldin
Copy link

alaldin commented Oct 26, 2019

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
Copy link

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
Copy link
Member

tmotyl commented Dec 1, 2019

Can you please send a pull request?

@websiteni
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants