Magento – “Database connection error” when installing 1.7.0.2 on Ubuntu

errorinstallMySQL

I'm installing Magento version 1.7.0.2 on an Ubuntu VM, hosted in Azure – I'm getting "Database connection error" in the Magento Installation Wizard.

I've installed PHP & MySQL as instructed here.
In mysql, I've granted access to a userx, which is the same one entered in the wizard.

Other threads suggested (and I tried):

  • Replacing "localhost" with "127.0.0.1" – didn't help
  • Installing "InnoDB" – Mysql says it is default

EDIT – These are the modules I've installed:
sudo apt-get install apache2
sudo apt-get install php5 libapache2-mod-php5
sudo apt-get install php5-mysql
sudo apt-get install php5-curl php5-mcrypt php5-gd php5-common
sudo apt-get install mysql-client mysql-server

Best Answer

What version of MySQL are you running? In 5.6 the have_innodb check is no longer working and could cause the connection failure. See https://github.com/magento/magento2/issues/202 for details.