I don't know anything about what's in your xampp\mysql\backup
folder, but moving anything around in the MySQL datadir (your xampp\mysql\data
) while the server daemon/service is running is going to cause you trouble. The MySQL server uses various files in there while it's running and even moving around folders within that folder (such as trying to copy a database from one system to another) won't work properly because (generally) all the files and folders are related (such as the ibdata1 file, which is sort of the glue that holds together all of your databases and users).
It's pretty unclear what's going on. From the error message, for some reason MySQL rejected the connection. Perhaps your user accounts were corrupted when you copied the folder. Perhaps you changed your user's permissions and now can't log in because the user doesn't have proper permissions or the password is changed. In particular, the "Invalid settings" error suggests that there could be a problem in your phpMyAdmin configuration file, config.inc.php
that is improper. Have you made any chances to that since you were able to log in?
You could try to reset the permissions and, once you have access, repair the damage to your other user accounts. If you would be so kind as to tell me your operating system, I'll paste the relevant directions here; the page is rather long to paste the entire contents here.
In addition to your main user not being able to log in, phpMyAdmin has an optional secondary user that is used for administrative tasks to enable advanced features, such as bookmarking queries, hiding databases or tables, and managing user groups. That user is called the controluser, and that account isn't able to log in, either. Once you regain control, you can either recreate that user (you can find the full directions at https://docs.phpmyadmin.net/en/latest/setup.html#manual-configuration but because the Stack Exchange network likes to have all the information here, I'm going to copy and paste the commands below). You could also disable the controluser, if you edit config.inc.php you can comment out or remove the two lines for $cfg['Servers'][$i]['controluser']
and $cfg['Servers'][$i]['controlpass']
.
To create the phpMyAdmin control user:
For any MariaDB version:
CREATE USER 'pma'@'localhost' IDENTIFIED VIA mysql_native_password USING 'pmapass';
GRANT SELECT, INSERT, UPDATE, DELETE ON `<pma_db>`.* TO 'pma'@'localhost';
For MySQL 8.0 and newer:
CREATE USER 'pma'@'localhost' IDENTIFIED WITH caching_sha2_password BY 'pmapass';
GRANT SELECT, INSERT, UPDATE, DELETE ON <pma_db>.* TO 'pma'@'localhost';
For MySQL older than 8.0:
CREATE USER 'pma'@'localhost' IDENTIFIED WITH mysql_native_password AS 'pmapass';
GRANT SELECT, INSERT, UPDATE, DELETE ON <pma_db>.* TO 'pma'@'localhost';
Note that MySQL installations with PHP older than 7.4 and MySQL newer than 8.0 may require using the mysql_native_password authentication as a workaround.