Magento installation on windows shows Database connection error on xampp?
I am using the xampp Version 1.6.4 with PHP Version 5.2.4 and I am trying to Install the Magento latest version on xam开发者_如何学Gopp.I got the error in the configuration page.That is, it shows the 'Database connection error.'.
Fields I filled up in the Page:Database Connection
- Host ----- localhost
- Database Name---- Magento(already created in phpMyadmin)
- User Name ----- root
- Password ----- blank
Web access options
Base URL ------ http://127.0.0.1/magento/
Admin Path ------ admin
Enable Charts ---- Checked
Skip Base URL Validation Before the Next Step --Checked
Use Web Server (Apache) Rewrites --- Unchecked
Use Secure URLs (SSL) ---- Unchecked
Session Storage Options
11.Save Session Data In -- File system
I already created the Magento database in the phpMyadmin.But when I click continue it displays error.I dont know why?Please help me in this.
Update: phpMyadminConfiguration
$cfg['PmaAbsoluteUri'] = '';
$cfg['PmaNoRelation_DisableWarning'] = FALSE;
$cfg['blowfish_secret'] = 'xampp';
$i = 0;
$i++;
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['ssl'] = false;
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['compress'] = FALSE;
$cfg['Servers'][$i]['controluser'] = '';
$cfg['Servers'][$i]['controlpass'] = ''; // access to the "mysql/user"
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['SignonSession'] = '';
$cfg['Servers'][$i]['SignonURL'] = '';
$cfg['Servers'][$i]['LogoutURL'] = '';
$cfg['Servers'][$i]['nopassword'] = FALSE;
$cfg['Servers'][$i]['only_db'] = '';
$cfg['Servers'][$i]['hide_db'] = '';
$cfg['Servers'][$i]['verbose'] = '';
$cfg['Servers'][$i]['pmadb'] = '';
Go to users within phpMyAdmin.
Make sure the host
for the user you're entering in Magento is set to localhost
and not %
(any).
This is a pretty old question but I came across it recently and I hope this answer helps someone else. My issue came down to an old version of Magento on top of a new WAMP installation. Since MySQL 5.6.1, the have_innodb variable has been removed. However, the Magento installer checks for that variable and throws an error if it doesn't find it. If you actually check the exception log you'll see an error that the database server does not support InnoDB. Yet in the catch
handler it only logs that exception and throws a generic "Database connection error" message.
The simplest fix, if you're sure your DB supports InnoDB, is to simply edit app\code\core\Mage\Install\Model\Installer\Db.php
, find the checkDatabase
method, and comment out the portion at the end of the try
block that checks for have_innodb. Normally, I would not advocate editing core files, but this is only to get the installer working, so I'd say it's safe enough.
Hope that helps anyone else in a similar situation.
I had the same problem, but after using host:port it worked perfectly. In my case its 127.0.0.1:3306
Try to change at Database connection settings host to 127.0.0.1
I had a similar issue. It appears it is related to a DNS issue in that Magento is looking for a valid type URL of the form http://xxxxxx.xxx where x is whatever name you create. Dont use a .com, .net etc..create some random one .ecs for example. You can't use 127.0.0.1 as the URL or localhost for Magento (at least that was my experience using XAMPPLITE.
I downloaded HostXpert (free) and assigned a dummy URL like demo.ecs to 127.0.0.1 and then did the Magento install to demo.ecs
Before you do the install, verify that your localhost demo.ecs works when you load it into your browser.
Hope that helps.
It seems you are using XAMPP for local development. In that case, you may want to also checkout BitNami Magento. It is very similar to XAMPP in that it is free, multiplatform and self-contained, but it comes with Magento preinstalled by default.
You need to provide an all privileges account with a password on your magento database. Once you click continue Magento will populate the database with a whole bunch of tables. It can take a few minutes depending on your connection or your PC (for local installations).
Steps to solve your problem.
- Type
localhost
and enter - Select
english
option localhost/xampp/index.php
page will come- Left sidebar have
security
tab, click on that localhost/security/index.php
page will come- Set your username
root
and password (as u want) - Go for installation process and fill \
Database Connection:
Host ----- localhost
Database Name---- Magento(already created in phpMyadmin)
User Name ----- root
Password ----- you have set above
That's all perfect.
I think for magneto database you need to access to the local host area but let's say we have a site like http://yoursite.com
and if we substitute anything at the place of com
then what will be the procedures? I have multiple sites and going to set this but I do not want to get errors.
For me this was a permissions problem.
I had given the user grant all permissions from the commandline but on rechecking through phpMyAdmin (because of this error) I noticed that the user did not have the permissions I had set.
Once I corrected this it worked.
The users section is shown in the image below:
phpMyAdmin Users Section
精彩评论