I changed the root password to test and now I cannot login in phpMyAdmin page in XAMPP. I looked for help here and here which basically says changed config.inc.php file in XAMPP\PHPMYADMIN folder.
/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'test'; <---- changed this
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
/* User for advanced features */
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = 'test'; <--- I changed this too (Edit: Not needed)
This code below works which uses the above password
if($_SERVER['REMOTE_ADDR']=="127.0.0.1")
{
define("DATABASE_SERVER", "localhost");
define("DATABASE_USERNAME", "root");
define("DATABASE_PASSWORD", "test");
define("DATABASE_NAME", "TIGERWOODS");
}
This happend to me bofore on Mac and I could not resolve it. Now it happened again on WinXP. I am using Xampp 1.7.4.
Fixing the MySQL server not starting in XAMPP is done by reverting back the data files pre-issue. Navigate to your XAMPP MySQL directory ( C:\xampp\mysql ). Create a new folder called FIX_BACKUP . Copy C:\xampp\mysql\backup and C:\xampp\mysql\data into C:\xampp\mysql\FIX_BACKUP .
I have been confronted with the same problem, so I went to :
/xampp/phpmyadmin/config.inc.php
I pasted the password which I had enter earlier then I was able to access phpmyadmin again, there in the privileges tab/ edit/ I chose no password and go then it all came back to life :)
Also you can change the user to admin but your phpmyadmin would be in admin side and your other localhost website will not work either.
I also had the same problem and it tooks me several hours to figured out.
I just changed 'config' to 'cookie'
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['host'] = '127.0.0.1:3307';
if u change port address
The above code fixed problem for most of the ppl but I still could not login. Finally I found this (line#9 in the above code needs to be changed)
$cfg['Servers'][$i]['AllowNoPassword'] = true; <--- change this
$cfg['Servers'][$i]['AllowNoPassword'] = false; <--- to this fixed the problem.
Note: there are other areas in localhost where you have to change the password manually. For example in "CD Collection" example. The password is hard coded there rather than picking it up from config.inc.php.
I also faced the same problem it was because another mysql service was running and in parallel mysql in xampp i was trying to run. So you may check that out if other solutions don't work out. You can stop that by the following command:
sudo service mysql stop
May help few users.
I also have the problem but now solved
$cfg['Servers'][$i]['user'] = 'admin';
- I change the user name from 'root' to 'admin'
all you have to do is stopping
mysqld.exe
from the task manager and restart the server (Xammp)
**Step1**: Go to xampp/phpMyAdmin/config.inc.php
**Step2**: Search this: $cfg['Servers'][$i]['host'] = '127.0.0.1';
**Step3**: Replace with $cfg['Servers'][$i]['host'] = '127.0.0.1:3307';
Here 3307 will be change with your mysql port number, in my case it is 3307. Most of the times it will be 3306.
You can check your mysql port number from here : xampp/mysql/bin/my.ini
it may be another mysqld instance running and stoped it with:
sudo service mysql stop
Worked for me.
In xampp\phpMyAdmin\config.inc.php : changing:
'config';$cfg['Servers'][$i]['user'] = 'root'
to
'config';$cfg['Servers'][$i]['user'] = 'user'
and
$cfg['Servers'][$i]['controluser'] = 'root'
to
$cfg['Servers'][$i]['controluser'] = 'user'
Solved my Problem.
Put generated password in config.inc.php if you changed root user password. I was repeatedly putting password that it asks in phpmyadmin and not generated password.
Being a noob in php and just starting out in xampp, I changed root user password and phpmyadmin has generate password button which generates password that's suppose to get updated in config.inc.php files line but it didn't so I manually updated it.
$cfg['Servers'][$i]['password'] = 'dRHfGtwfJXhzC96M';
On the other hand, this might also help, it involves adding a line to resetroot.bat
Best Way is reinstall if you have xampp/wamp/mamp or in linux uninstall and reinstall phpmyadmin by using apt-get
I made changes to the config file for Laravel and completely forgot the changes. After applying everything from this thread, I had no success.
I simply overwrote the config.inc file from another xampp installation and it worked fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With