Installing and upgrading help

Error: Database connection failed

 
Picture of Davide Lista
Error: Database connection failed
 

Hi,

I tried to install moodle on localhost on windows with xampp, but when i have to configure the db i have this error (i use the port: 8080):


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:\Users\user\Desktop\xampp\htdocs\moodle\lib\dml\mysqli_native_moodle_database.php on line 79


This is line 79:

 $conn = new mysqli($dbhost, $dbuser, $dbpass, '', $dbport, $dbsocket); // Connect without db


I also tried to use the port 3306 or 80 but with the first port i have the same error while with the second port it goes in loop.

Someone can help me?

 
Average of ratings: -
Picture of Ken Task
Re: Error: Database connection failed
Particularly helpful Moodlers

Not a Windows person ... maybe Usman (resident Windows expert) will jump in here.

In the meantime:

https://docs.moodle.org/35/en/Windows_installation_using_XAMPP

In particular ... read ..

https://docs.moodle.org/35/en/Windows_installation_using_XAMPP#Option_create_the_database

'spirit of sharing', Ken

 
Average of ratings: -
Picture of Davide Lista
Re: Error: Database connection failed
 

Thank you!

 
Average of ratings: -