Cannot connect to database master at SQL server. The database might not exist, or the current user does not have permission to connect

Cannot connect to database master at SQL server SharePoint 2016

In this article, we will solve “Cannot connect to database master at SQL server the database might not exist” in SharePoint 2013/2010.

Cannot connect to database master at SQL server. The database might not exist, or the current user does not have permission to connect to it.

Cannot connect to database master at SQL server SharePoint 2013

You might also like to read SharePoint 2019: Service Accounts Recommendations.


Cannot connect to database master at SQL server SharePoint 2013

After I had installed SharePoint, I checked Run SharePoint Product Configuration Wizard to configure the SharePoint Farm.

In “Specify Configuration Database Settings” step, I have provided the server name setting with the correct farm account credentials, but I got the below error :

SharePoint Configuration Wizard: Cannot connect to database master at SQL server SharePoint 2013. The database might not exist, or the current user does not have permission to connect to it.

Cannot connect to database master at SQL server at SERVERNAME. The database might not exist, or the current user does not have permission to connect to it

You might also like to read SharePoint 2019: Cannot connect to database master at SQL server.


Cause: Cannot connect to database master at SQL server. The database might not exist

The “Cannot connect to database master at SQL server SharePoint 2013” issue might occur in case,

  • The Database Server is not reachable from the SharePoint Application Server.
  • The SQL Server port is closed and is not accessible from SharePoint Application Server.
  • The domain user credentials maybe not provided correctly.
  • SQL Server Service is stopped.
  • SQL Agent is stopped.
  • SQL Server Browser is stopped.
  • The provided domain user (Farm Account) doesn’t have sufficient permission (dbCreator, SecurityAdmin) to access DB Server.
  • SQL Server Network Configuration TCP/IP is disabled.
  • SQL Server server was blocked by Firewall.

You might also like to read SQL Server Best Practices for SharePoint 2019.


SharePoint Configuration Database Settings Check List

To overcome this issue “Cannot connect to database master at SQL server. The database might not exist“, you should go through the below check list:

The Database Server is not reachable from the SharePoint Application Server

  • Make sure that the Database server is up and running.
  • From the SharePoint Application Server, try to ping the SQL Server Virtual IP to make sure that it’s reachable.

The SQL Server port is closed and is not accessible from SharePoint Application Server

The default SQL Server Port is 1433, so make sure that you can telnet the SQL Server Virtual IP on SQL Server Port.

telnet "the SQL Server IP" 1433

Check also Check the connectivity between the application server and SQL server instance on the database server.


The farm account credential is not correct

Make sure that you have provided the correct farm account credential. try to type it again.


SQL Server Service is stopped

  • Open SQL Server Configuration Wizard.
SQL Server Configuration manager
  • Check the SQL Server Service and SQL Agent and make sure both are started and worked properly.
SQL service Started
  • If it is not running, try to start it.

Check also SQL SERVER SERVICE IS NOT STARTING!


The Farm Account doesn’t have sufficient permissions to connect to DB Server.

Make sure that the current login account that you are using to run SharePoint Configuration Wizard as well as the provided farm account that you have specified in user name text box have the below server roles on SQL Server Instance:

  • dbCreator.
  • securityadmin.
Provide the SharePoint Farm Account the required Permissions in SQL Server.
  • Open SQL Management Studio > Connect to SQL Server using sysadmin account.
  • Go to Security > New Login > search for the Farm Account.
Add SharePoint Farm Account to SQL Server
  • At “Server Roles”, make sure that the DbcreatorSecurityadmin roles have been checked.
Provide the SharePoint Farm Account the required Permissions in SQL Server.

SQL Server Network Configuration TCP/IP disabled.

  •  Check SQL Server Network Configuration TCP/IP status and ensure that it is Enabled.
Sql Server Netowrk Configration

SQL Server server was blocked by Firewall

If all previous steps did not solve the issue, so you need to check Firewall Settings. where Firewall may be blocking the access to Microsoft SQL Server server, In this case, you have 2 options:

[Option 1] Disable Firewall,(Not recommended)
  • Open Windows Firewall with Advanced Security.
Open windows firewall with advanced security.
  • Right Click > Select Properties.
Windows Firewall with Advanced Security properties
  • In firewall state > select off.
Disable Firewall
[Option 2] Adjust Firewall to Allow Inbound Connections Rules
  • Set FireWall State to “Allow”.
  • Create Two Inbound Connections Rules as the following:
    • One inbound TCP rule with ports: 1433,2383,2382.
    • One inbound UPD rule with port: 1434.
firewall allow inbound connections rules

In my case, the issue “Cannot connect to database master at SQL server. The database might not exist” was related to the firewall settings, after allowing and configuring the inbound rule connection, the SharePoint configuration wizard worked properly as shown below:

Specify Farm Security Settings

Conclusion

In conclusion, we have explore the common SharePoint Configuration Database Settings Check List to avoid “Cannot connect to database master at SQL server. The database might not exist” issue during configuring a new SharePoint 2013 /2010 farm.

Applies To
  • SharePoint 2016.
  • SharePoint 2013.
  • SharePoint 2010.
See Also
Have a Question?

If you have any related questions, please don’t hesitate to ask it at deBUG.to Community.

5 thoughts on “Cannot connect to database master at SQL server. The database might not exist, or the current user does not have permission to connect”

  1. Pingback: Cannot connect to database master at SQL server in SharePoint | ITCore

Leave a Reply