Вы находитесь на странице: 1из 3

PHPMyAdmin doesn't connect after root

password change
I installed Xampp (for Windows). I was happily using it with its all features.
Then I wanted to change MySql password. I set a randomly generated password
(rCZ4Xnz78zbLY2Vh). Then PHPMyAdmin stopped logging in. It started to give the
following error message, and it is the same ever since:
Error
MySQL said:
Cannot connect: invalid settings.
phpMyAdmin tried to connect to the MySQL server, and the server
rejected the connection.
You should check the host, username and password in your configuration
and make sure that
they correspond to the information given by the administrator of the
MySQL server.

Then I edited the `config.inc.php" file of PHPMyAdmin, and made its contents exactly
as below:

up vote
3 down <?php
vote
favorit /* Servers configuration */
$i = 1;
e
$cfg['Servers'][$i]['host']
2
$cfg['Servers'][$i]['port']

=
=
$cfg['Servers'][$i]['ssl']
=
$cfg['Servers'][$i]['connect_type'] =
$cfg['Servers'][$i]['extension']
=
$cfg['Servers'][$i]['compress']
=
$cfg['Servers'][$i]['controluser'] =
$cfg['Servers'][$i]['controlpass'] =
$cfg['Servers'][$i]['auth_type']
=
$cfg['Servers'][$i]['user']
=
$cfg['Servers'][$i]['password']
=
$cfg['Servers'][$i]['nopassword']
=

'127.0.0.1';
'3306';
FALSE;
'tcp';
'mysql';
FALSE;
'root';
'rCZ4Xnz78zbLY2Vh';
'config';
'root';
'rCZ4Xnz78zbLY2Vh';
TRUE;

/* rajk - for blobstreaming */


$cfg['Servers'][$i]['bs_garbage_threshold']
$cfg['Servers'][$i]['bs_repository_threshold']
$cfg['Servers'][$i]['bs_temp_blob_timeout']
$cfg['Servers'][$i]['bs_temp_log_threshold']
/* Other settings */
$cfg['blowfish_secret'] = '';
$cfg['DefaultCharset'] = 'utf-8';
$cfg['UploadDir']
= '';

=
=
=
=

50;
'32M';
600;
'32M';

$cfg['SaveDir']

= '';

?>

But I was able to connect to the MySql servier via command line by the same password .
C:\Users\hkBattousai>mysql.exe --user=root --password=rCZ4Xnz78zbLY2Vh
mysql.exe: Unknown OS character set 'cp857'.
mysql.exe: Switching to the default character set 'latin1'.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 21
Server version: 5.5.27 MySQL Community Server (GPL)
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights
reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input
statement.
mysql>

Then I removed the password via the command line interface:

I also removed password from the config.inc.php file. The relevant lines in that file
are now:

$cfg['Servers'][$i]['controluser']
$cfg['Servers'][$i]['controlpass']
$cfg['Servers'][$i]['user']
$cfg['Servers'][$i]['password']

=
=
=
=

'root';
'';
'root';
'';

Currently, it is strange but, I can connect with the password I deleted, but I cannot
connect with empty password:
C:\Users\hkBattousai>mysql.exe --user=root --password=rCZ4Xnz78zbLY2Vh
// Connects
C:\Users\hkBattousai>mysql.exe --user=root --password=
// Error given

I want to assign another random password to this user, and I want to access my database
via PHPMyAdmin, as I did within the fresh Xampp installation before. What should I
do? I'm really confused and I need your help.
It is like the config.inc.php file contents are ignored. I copied it from the template file
config.sample.inc.php and altered its contents. It is now located in the directory
\Xampp\phpmyadmin\.

Versions:
Xampp
MySQL
PHP
Apache
Windows

:
:
:
:
:

3.1.0
5.5.27
5.4.7
2.4
7 Ultimate x64 SP1

Sumber :

http://stackoverflow.com/questions/13010268/phpmyadmin-doesnt-connect-after-root-passwordchange

Вам также может понравиться