You must enter the database access data that has been set up in your XAMPP for the database in the wp-config.php file. There are many instructions online on how to configure the database in XAMPP, for example: https://stackoverflow.com/questions/17823189/how-do-i-use-mysql-through-xampp – make sure you enter the host, database name, user, password, and port exactly as specified.
If necessary, also check your firewall, as it could also interfere with the database connection. If you have any further questions, I would recommend contacting the XAMPP community: https://www.apachefriends.org/community.html
Hi @alexandria455, with all the advice from @threadi, I just want to add, if you check your xampp server? In some cases, I saw, Xampp MySQL stopped automatically. And in that case, no database will load. And you will get the “Error Establishing” error.
You can check http://localhost/phpmyadmin. If this isn’t loading, then fix it. If it loads correctly, check the database name in your wp-config file. They must be the same to get connected.
Hope this helps. Regards