joseph_pindi
joseph_pindi

Reputation: 867

password reset prevents access to phpmyadmin

This is a similar problem to here but stepping through the solution, my config.inc.php file does NOT contain $cfg. I'll just recap the problem:

As you know, when you install XAMPP it defaults to no password. I added a password but can no longer access phpmyadmin. When I go to

localhost/phpmyadmin/

I get the error message in the page loaded:

1045 - Access denied for user 'root'@'localhost' (using password: NO)

Its contents are below. Note that I have XAMPP for Mac OS X 1.7.3. I think the problem is I've reset the passwords, but XAMPP doesn't recognize this and is still trying to get in without using a password. Almost like a cookies setting. Without $cfg in config.ini.php what file in XAMPP can I change to correct the problem? Here is what is contained in config.ini.php:

<?php
/**
 * Config file view and save screen
 *
 * @package    phpMyAdmin-setup
 * @author     Piotr Przybylski <[email protected]>
 * @license    http://www.gnu.org/licenses/gpl.html GNU GPL 2.0
 * @version    $Id: config.inc.php 12348 2009-04-14 10:19:02Z nijel $
 */

if (!defined('PHPMYADMIN')) {
    exit;
}

/**
 * Core libraries.
 */
require_once './setup/lib/FormDisplay.class.php';
require_once './setup/lib/index.lib.php';

$config_readable = false;
$config_writable = false;
$config_exists = false;
check_config_rw($config_readable, $config_writable, $config_exists);
?>
<h2><?php echo $GLOBALS['strSetupConfigurationFile'] ?></h2>
<?php display_form_top('config.php'); ?>
<input type="hidden" name="eol" value="<?php echo htmlspecialchars(PMA_ifSetOr($_GET['eol'], 'unix')) ?>" />
<?php display_fieldset_top('', '', null, array('class' => 'simple')); ?>
<tr>
    <td>
        <textarea cols="50" rows="20" name="textconfig" id="textconfig" spellcheck="false"><?php
            echo htmlspecialchars(ConfigFile::getInstance()->getConfigFile())
        ?></textarea>
    </td>
</tr>
<tr>
    <td class="lastrow" style="text-align: left">
        <input type="submit" name="submit_download" value="<?php echo $GLOBALS['strSetupDownload'] ?>" class="green" />
        <input type="submit" name="submit_save" value="<?php echo $GLOBALS['strSave'] ?>"<?php if (!$config_writable) echo ' disabled="disabled"' ?> />
    </td>
</tr>
<?php
display_fieldset_bottom_simple();
display_form_bottom();
?>

Upvotes: 0

Views: 387

Answers (2)

Marc Delisle
Marc Delisle

Reputation: 8997

There is a config.inc.php under setup/frames, this is the one you are showing us but it's not the one that contains the configuration. Look at the main directory containing all the db_* and tbl_* scripts. However, phpMyAdmin is able to run without a config.inc.php.

Do you see a login panel with phpMyAdmin logo?

Upvotes: 0

Lkopo
Lkopo

Reputation: 4833

Do not open config.ini.php, but config.inc.php which is in PMA root.

PMA Wiki: http://wiki.phpmyadmin.net/pma/config.inc.php

Example of code in config.inc.php: http://docs.phpmyadmin.net/en/latest/setup.html

Upvotes: 1

Related Questions