In the second step of the Magento 2 installation, despite correct login data database connection fails. After you click on Next nothing happens at all, no loading animation, nothing. But if you wait for 30 seconds (depends on configuration) the error message will appear.
Can't connect to MySQL server on 'localhost' (10060 "Unknown error")
If you try to connect using the command line client provided with XAMPP, you may experience the same issue:
In addition to that, mysql client does not exit after output, and you cannot kill the process with CTRL+C.
- Running mysqld as service,
- Running mysqld as administrator,
- Running mysql as administrator,
- Connecting with -h parameter: mysql -uroot -h 127.0.0.1.
If nothing from the list above helps, check if there is any firewall blocking the mysqld (MySQL-Server). Remove all mysqld entries from the list of known programms and restart MySQL-Server.