This is the error message I got after I tried to make a password and username for localhost and root. Please help me. I am using Mac by the way.
MySQL said: Documentation
Cannot connect: invalid settings.
mysqli::real_connect(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: NO)
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.
3
Answers
go to xamppmysqlbinmy.ini and open it. change the port to 3307
and go to xamppphpMyAdminconfig.inc.php and check the name of the host
$cfg['Servers'][$i]['host'] = 'localhost:3307';
Adding to soufiane’s answer above, there is actually 2 more places where you have to make the same change:
$cfg['Servers'][$i]['port'] = 3307;
to phpMyAdminconfig.inc.phpFor a complete start to finish solution, refer to this answer on Quora by Owais R. Mir: https://www.quora.com/How-do-I-change-the-port-of-a-MySQL-server-in-XAMPP/answer/Owais-R-Mir
PS:
I used this solution to run mysql from xampp on port 3307 because I had installed mysql separately before and it was using port 3306. When ports are reset for xampp mysql you avoid issues with initializing and signing in to your local database via phpmyadmin.
So , you have to open XAMPP Control Panel –> Click MySql Config- >Click my.ini
You have to write this line
skip-grant-tables
after [mysqld].Open xamp folder ->PhpMyAdmin .You will see config.inc.php file in phpMyAdmin folder, just open it with notepad++
$cfg[‘Servers’][$i][‘host’] = ‘127.0.0.1’;
This is default port number.Resolve this issue by manually editing in the file “config.inc.php” located at “C:xamppphpMyAdmin”. Write “localhost:3307” <— Your port PhpMyAdmin within
$cfg[‘Servers’][$i][‘host’] = ‘localhost:3307′;
<— Your port PhpMyAdminSave this changes. You can find port number as follows: Open XAMP–>config–>service port setting–>mySql.edit port 3307