2

I tried to install Magento using XAMPP for Linux (I use 32-bit Ubuntu), I've created a database, and when you want to add via Magento Installer I get an error message like this:

Picture

I've tried a variety of ways, but it does not work, is there a solution?

asked Dec 8, 2016 at 6:12
10
  • Make sure ur Host is correct Commented Dec 8, 2016 at 6:13
  • @AnkitShah When I try to change the host febri , I get the following error like SQLSTATE[HY000] [2002] Connection refused Commented Dec 8, 2016 at 6:17
  • 1
    @FebriyantoNugroho replace localhost to 127.0.0.1 and then check Commented Dec 8, 2016 at 6:19
  • 2
    Possible duplicate of PDO Exception error on index Commented Dec 8, 2016 at 6:20
  • @ManthanDave Error result I have SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: NO) Commented Dec 8, 2016 at 6:21

2 Answers 2

5

Try to replace localhost to 127.0.0.1 and check

This is commonly caused by a different instance of PHP being used by the PHP command line compared to the web server. In particular, mysql.sock might be misconfigured.

Refer this magento devdocs link http://devdocs.magento.com/guides/v2.0/install-gde/trouble/php/tshoot_phpini.html

You can also refer - PDO Exception error on index

It will works

answered Dec 8, 2016 at 6:15
6
  • Do I have to add value to the pdo_mysql.default_socket ? Commented Dec 8, 2016 at 6:27
  • @FebriyantoNugroho after chaning localhost to 127.0.0.1 now you have access denied error right ? please confirm ? Commented Dec 8, 2016 at 6:30
  • Yes sir, of course Commented Dec 8, 2016 at 6:32
  • @FebriyantoNugroho so now your first issue is solved , you just need to pass correct password . Check your database password with privillages and enter that password in the password field. it will works Commented Dec 8, 2016 at 6:33
  • I'll try it later Commented Dec 8, 2016 at 6:37
0

In your terminal run below command and look for MYSQL_SERVICE_PORT_33060_TCP_ADDR. You can use for your database server host.

php -i

enter image description here

answered Feb 20, 2021 at 16:23

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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.