Magento Forum

   
Page 1 of 2
Database connection error
 
denge
Jr. Member
 
Total Posts:  1
Joined:  2011-05-10
 

When the installation shows error “Database connection error.”
the correct user name and password. Why is the error?

Image Attachments
problem.jpg
 
Magento Community Magento Community
Magento Community
Magento Community
 
Turnkeye
Moderator
 
Avatar
Total Posts:  908
Joined:  2008-12-20
URL: turnkeye.com
 

Make sure that MySQL can access MySQL database.

If you use cPanel, you can simply add your MySQL user to database using cPanel interface.

 
Magento Community Magento Community
Magento Community
Magento Community
 
SimpleHelixcom
Enthusiast
 
Avatar
Total Posts:  906
Joined:  2007-08-31
Huntsville, AL
 

Hello,

Be sure the MySQL server is actually listening on localhost and is not blocked. Some hosts out there have alternate MySQL hosts that do not operate on localhost, and sometimes even use alternate ports.

 
Magento Community Magento Community
Magento Community
Magento Community
 
sjalowoi
Jr. Member
 
Total Posts:  10
Joined:  2011-05-08
 

I have exactly the same issue with the installation Wizard.
All my db parameters are correctly filled and I have checking my db connection through phpmyadmin (installed on the same web server) and it works well.

If anyone have an idea !!

 
Magento Community Magento Community
Magento Community
Magento Community
 
mausy30
Jr. Member
 
Total Posts:  2
Joined:  2011-05-12
Bangkok
 

Same me, I don’t know what happen even i will try to do it best and i think it will work well without problem but it don’t.

 
Magento Community Magento Community
Magento Community
Magento Community
 
hxd
Sr. Member
 
Avatar
Total Posts:  224
Joined:  2011-02-03
 

Make sure your host has InnoDB enabled in their MySQL config:

How to check whether InnoDB engine is enabled in MySQL

 
Magento Community Magento Community
Magento Community
Magento Community
 
kiraqi84
Jr. Member
 
Total Posts:  5
Joined:  2011-05-11
 

hi,

I’m experiencing the same issue with my magento install using Mamp pro. If anyone can provide some info for Mamp pro it will b muc appreciated.

Thank you

Ps: I’ve checked innodb module has been activated

 
Magento Community Magento Community
Magento Community
Magento Community
 
sjalowoi
Jr. Member
 
Total Posts:  10
Joined:  2011-05-08
 

hereafter show engines command result :

innodb Support=default, transactions=yesxa=yessavepoints=yes
It seems OK. NO ??
Any other suggestions ? I’m still stuck with this *%# issue .

FYI : my Os is osx 10.6.7.

 
Magento Community Magento Community
Magento Community
Magento Community
 
sjalowoi
Jr. Member
 
Total Posts:  10
Joined:  2011-05-08
 

I’ve checked mysql log and validate that connection is done :
I saw those two followings query execute by the installation wizard :

from my mysql general log :

                  
492 Query    SET SQL_MODE=''
          
492 Query    SHOW VARIABLES
          492 Quit
Tthe result is still database connection error !!!!!

So I expect that’s a db configuration problem but which one ?? My database is set to work with innodb. Connection is done but the setup doesn’t finish well ...

 
Magento Community Magento Community
Magento Community
Magento Community
 
sjalowoi
Jr. Member
 
Total Posts:  10
Joined:  2011-05-08
 

I finally solve my issue.

The problem was an evolution from mysql 5.6.2 which remove ‘have_innodb’ variable ( see http://forums.mysql.com/read.php?3,415985).

The magento 1.5.1 installation wizard doesn’t work with this mysql version, retrieving all the time ‘ database connection error’.

For the moment, until the patch come, after having checked the innodb format of your db,
you can from this file ‘app/code/core/Mage/Install/Model/Installer/Db.php’, remove the following code :

// check InnoDB support
/* if (!isset($variables[’have_innodb’]) || $variables[’have_innodb’] != ‘YES’) {
Mage::throwException(Mage::helper(’install’)->__(’Database server does not support the InnoDB storage engine.’));
}*/

 
Magento Community Magento Community
Magento Community
Magento Community
 
rockyteng
Jr. Member
 
Total Posts:  3
Joined:  2011-04-27
 

Hi,

if InnoDB is a must,why do not include it in the magento-check.php file.
i run the above check file successfully ,but came with the problem when installing.
what can i say?

Best regards,
Rocky

 
Magento Community Magento Community
Magento Community
Magento Community
 
WebhostUK LTD
Sr. Member
 
Avatar
Total Posts:  163
Joined:  2009-08-27
UK
 

Yes thats true without InnoDB enabled on the server, you cannot get magento in working condition. So its a must factor. There is no work around for innoDB.

 
Magento Community Magento Community
Magento Community
Magento Community
 
rockyteng
Jr. Member
 
Total Posts:  3
Joined:  2011-04-27
 

Hi,

i do accordingly,common out the code below and i am able to install magento to my server.
this there any drawback to disable innodb?
i am afraid i have to disable it because the hosting said
[Unfortunately, we do not support InnoDB. We support MyISAM storage engine on our MySQL servers. ]

Best regards,
Rocky

sjalowoi - 18 May 2011 11:56 PM

I finally solve my issue.

The problem was an evolution from mysql 5.6.2 which remove ‘have_innodb’ variable ( see http://forums.mysql.com/read.php?3,415985).

The magento 1.5.1 installation wizard doesn’t work with this mysql version, retrieving all the time ‘ database connection error’.

For the moment, until the patch come, after having checked the innodb format of your db,
you can from this file ‘app/code/core/Mage/Install/Model/Installer/Db.php’, remove the following code :


// check InnoDB support
/* if (!isset($variables[’have_innodb’]) || $variables[’have_innodb’] != ‘YES’) {
Mage::throwException(Mage::helper(’install’)->__(’Database server does not support the InnoDB storage engine.’));
}*/

 
Magento Community Magento Community
Magento Community
Magento Community
 
rockyteng
Jr. Member
 
Total Posts:  3
Joined:  2011-04-27
 

thanks for your reply,
much appreciated !

WebhostUK LTD - 19 May 2011 11:27 PM

Yes thats true without InnoDB enabled on the server, you cannot get magento in working condition. So its a must factor. There is no work around for innoDB.

 
Magento Community Magento Community
Magento Community
Magento Community
 
cielkong
Jr. Member
 
Total Posts:  1
Joined:  2008-10-30
 

I have never seen such a bad experience when installing a script.
That is why I always don’t want to choose magento.

 
Magento Community Magento Community
Magento Community
Magento Community
 
ckauto
Jr. Member
 
Total Posts:  6
Joined:  2013-02-09
 

I had the same problem

But instead of “localhost” I put the Database Server IP information there and it worked fine.
Example: 00.00.00.000

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
Page 1 of 2