I changed password in phpmyadmin for root (there was no password actually) and now when I go to phpmyadmin, I receive this error:
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.
I went to config.inc.php to add the password there, but I can't save modified config.inc.php, it shows that I don't have enough permissions to save it.
I went to google and searched for issues. I tried to change permission through terminal with 644, but it didn't work for me.
I even tried to reinstall XAMPP, but I still get the same error.
Now I have phpmyadmin on my computer, which doesn't work at all and I can't change it.
Please help me, how can I fix it?
Also I am using Mac and XAMPP.
Open the Mac command shell.
Use the cd
command to set the directory to the location of your config.inc.php
file.
Type the following command:
sudo nano config.inc.php
You will be asked for your password; enter it. This puts the command into administrator mode.
This will open the Nano text editor in the command window where you can edit the file. Find the password field (use ctrl+w
if you need to search), edit it, and then use ctrl+x
to save and exit. You should now be able to use phpMyAdmin again.