This might seem redundant but I was unable to find a correct solution.
I was unable to login to mysql using the mysql console.It is asking for a password and I have no clue what I actually entered.(Is there a way to get the password or change it?) This is how my config.inc look.
When I try to open phpmyadmin I get this error(#1045 - Access denied for user 'root'@'localhost' (using password: YES))
<?php
/* Servers configuration */
$i = 0;
/* Server: localhost [1] */
$i++;
$cfg['Servers'][$i]['verbose'] = 'localhost';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['port'] = '3306';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'prakash123';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
/* End of servers configuration */
$cfg['DefaultLang'] = 'en-utf-8';
$cfg['ServerDefault'] = 1;
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';
/* rajk - for blobstreaming */
$cfg['Servers'][$i]['bs_garbage_threshold'] = 50;
$cfg['Servers'][$i]['bs_repository_threshold'] = '32M';
$cfg['Servers'][$i]['bs_temp_blob_timeout'] = 600;
$cfg['Servers'][$i]['bs_temp_log_threshold'] = '32M';
?>
I have tried to uninstall( Plus Deleted all the related files) WAMP and reinstall.It didn't help either. While reinstalling WAMP server it is not asking for any username password stuff I don't know why. Any help is highly appreciated.
After I updated my MySql, I was getting the same error message. It turned out that after installing a different version on MySql, inside the my.ini, the port was different. Previous MySql version had port 3306 but the new one have port 3308. Check your MySql my.ini, if it is different use the port from .ini in your connection.
if multiple myslq running on same port no enter image description here
Right click on wamp and test port 3306 if its wampmysqld64 its correct else change port no and restart server
Try the following code:
if you see Password column field as 'No' for the 'root' user in
Users Overview
page of phpMyAdmin.In the my.ini file in C:\xampp\mysql\bin, add the following line after the
[mysqld]
command under#Mysql Server
:This should remove the error 1045.
The problem was I have 2 instances of Mysql installed and I didn't know the password for both instances.Just check if port 80 is used by any of the programs. This is what I did
1.Quit Skype because it was using port 80.(Please check if port 80 is used by any other program).
2.Search for Mysql services in task manager and stop it.
3.Now delete all the related mysql files.Make sure you delete all the files.
4.Reinstall
Go to
C:\xampp\phpMyAdmin
Edit the
config.inc.php
fileReplace
$cfg['Servers'][$i]['auth_type'] = 'config';
by$cfg['Servers'][$i]['auth_type'] = 'cookie';
For now on the
PHPMyAdmin
will ask you for your password, no more error.