I am using Linux Mint 17.3. I started using
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
The solution is simple. You need to change permission of the file. Start the terminal (You can use Ctrl + Alt + T) and use the following commands:
cd <directory of your config file> sudo chmod 644 config.inc.php
The file should be editable for you to make changes.
Make sure you restart XAMPP server after saving the changes to the file.