Search code examples
phpmagentoxampp

Magento Installation SQLSTATE[HY000] [2002] No such file or directory error


I am a newbie at LAMPP enviroment and I installed XAMPP for installing Magento.

Everthing was going fine till "Add database" step of Magento installation. I created database which is called 'magento' from phpMyAdmin and I am getting this error. I made many searches on it most of people talked about connection type.

I couldn't handle that point. Is there anyone who know how to figure socketing for magento.

To see screenshoot please click here.Thank you from now.


Solution

  • I handled the problem by changing 'localhost' to '127.0.0.1'.

    First go to folder where you installed the xampp and find out config.inc.php. (mine is /opt/lamp/phpmyadmin/config.inc.php.

    After take a look to $cfg['Servers'][$i]['host'] = '127.0.0.1';.
    If it is localhost change by '127.0.0.1'