"Cannot connect to the configuration database orUnable to connect to database. Check database connection information and make sure the database server is running." This is “the” error that everyone has once in their life seen on SharePoint Product Configuration Wizard..
There are many reasons why:
"Cannot connect to the configuration database or Unable to connect to database. Check database connection information and make sure the database server is running."
This is the error that everyone has once in his life seen on SharePoint Product Configuration Wizard.
Review the PSCDiagnostics log at, C:\program files\common files\Microsoft shared\web server extensions\15 or \14 for the SharePoint logs
This is the kind error that you can receive with maybe more information: System.Data.SqlClient.SqlException was thrown. Additional exception information: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (Provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
In the list of services, locate the MSSQLSERVER service and be sure that it’s running. Be even sure that on the Microsoft SQL Server, the following services are running:
Firewall can block access and communication with your Microsoft SQL Server so you have 2 possibilities.
1433: SQL Server is a Winsock application that communicates over TCP/IP by using the sockets network library. SQL Server listens for incoming connections on a particular port. The default port for SQL Server is 1433. The port doesn't need to be 1433, but 1433 is the official Internet Assigned Number Authority (IANA) socket number for SQL Server.
2383: TCP port 2383 should be open when installing a default instance or creating an Analysis Services failover cluster.
2382: TCP port 2382 should be open when installing a named instance. Named instances use dynamic port assignments. As the discovery service for Analysis Services, SQL Server Browser service listens on TCP port 2382 and redirects the connection request to the port currently used by Analysis Services.
1434: the client computer would need to open a random UDP port and the server UDP port 1434 will be used to send the instance name, and if the instance is clustered, the version of the SQL instance, the TCP port number that the instance is listening on, and the named pipe that the instance is using. However, if the goal is to minimize the number of ports open on the firewall, a static port number should be chosen for the default instance and any named instance. The client computers would need to be configured to connect to a particular ServerName or ServerName instance and specific port number.
Is actually your SQL server correctly setup? Are you sure about the steps that you executed? If not please check here. All these links are official TechNet articles:
Next, you have to verify that your account has the required permissions on the SQL Server database.
Please be sure that if you made a copy of a Virtual Machine that you used sysprep before to avoid getting the same SID! You can use PSTOOLS to change this if it’s not the case.
The installation account is used to set up each server in your farm by running the SharePoint Configuration Wizard, the initial Farm Creation Wizard, and Windows PowerShell. For the examples in the setup user administrator account is used for farm administration, and you can use Central Administration to manage it. Some configuration options, for example, configuration of the SharePoint 2013 Search query server, require local administration permissions. The setup user administrator account requires the following permissions:
Gokan Ozcifci [MVP]