saving . . . saved Moodle installation on windows has been deleted. Moodle installation on windows has been hidden .
Moodle installation on windows
Title
Question

Error: Database connection failed

It is possible that the database is overloaded or otherwise not running properly.

The site administrator should also check that the database details have been correctly specified in config.php



Warning: mysqli::__construct(): (HY000/2002): No connection could be made because the target machine actively refused it. in C:\xampp\htdocs\moodle\lib\dml\mysqli_native_moodle_database.php on line 79

Moodle-Learning-Management-System Installing-Moodle-on-Local-Server 06-07 min 30-40 sec 14-05-20, 10:42 p.m. allamprabhu.v@gmail.com

Answers:

Please follow the steps in the below link of installation sheet (2nd page) to install Moodle on Windows 10.

https://spoken-tutorial.org/media/videos/97/Moodle-Learning-Management-System-Installation-Sheet-English.pdf
15-05-20, 2:25 p.m. NirmalaVenkat


Some helpful posts:
- https://stackoverflow.com/questions/39810171/mysqli-connect-hy000-2002-no-connection-could-be-made-because-the-target-m/39810359
- https://stackoverflow.com/questions/21987746/mysql-connect-no-connection-could-be-made-because-the-target-machine-actively
- https://stackoverflow.com/questions/22523298/error-sqlstatehy000-2002-no-connection-could-be-made-because-the-target-mac
- https://stackoverflow.com/questions/27905049/php-warning-mysqli-connect-hy000-2002-connection-refused

Also, please check -
- Make sure mysql service is actually running
- Check for the port, is it open?
Check this through XAMPP control panel.

Also, check your Moodle config file -
- Open up 'C:\xampp\htdocs\moodle\config.php'
- Check the parameters here for the database setup
- Please share your config.php file contents here if possible so that we can take a look at those

Let us know if you have any further queries.

16-05-20, 1:33 a.m. kashmira.n


Log-in to answer to this question.