Skip to content
DatabaseFAQs.com
DatabaseFAQs.com
  • Home
  • SQL Server
  • Azure SQL Server
  • Oracle
  • MariaDB
  • MongoDB
  • PostgreSQL

Cannot open server requested by the login. client is not allowed to access the server

March 23, 2023August 23, 2021 by Bijay
cannot open server requested by the login

In this Azure SQL blog, I will share my incident when I got this error “Cannot open server requested by the login. client is not allowed to access the server“.

Table of Contents

  • Cannot open server requested by the login. client is not allowed to access the server
  • Reason: Cannot open server requested by the login
  • Solution: Cannot open server requested by the login

Cannot open server requested by the login. client is not allowed to access the server

Recently, I was working with the Azure SQL database. I created a new single Azure SQL database in Microsoft Azure and tried to connect to it from the portal.

I was not able to connect to the database and got the error “Cannot open server ‘mysql1000’ requested by the login. Client with IP address ‘169.149.200.249’ is not allowed to access the server.” as shown below in the image:

cannot open server requested by the login
cannot open server requested by the login

Reason: Cannot open server requested by the login

After some google searching and studying about the error, I got to know the reason behind this error. There is a firewall in Azure SQL that protects the database from undesired connection requests.

In my case also, the firewall was not allowing connections from my machine’s IP address. I needed to configure the firewall settings in order to allow the connection request from my machine.

Solution: Cannot open server requested by the login

You can see the option Whitelist IP 169.149.200.249 on server mysql1000. You can click on this option to add your machine’s IP address to the whitelist of the firewall.

Whitelisting IP means allowing only the specified IP address to access the database. But this is a temporary solution.

A better approach is to configure the firewall settings in Azure SQL. There are multiple ways to configure the firewall in Azure SQL. But, the easiest way is to do it from the Azure portal.

If you want to configure the firewall, open the Azure portal and go to the server on which you have created the database. In the server Overview, click on Set server firewall to open the firewall settings. See the below image for reference:

cannot open server requested by the login azure sql
cannot open server requested by the login. client is not allowed to access the server

Once you have opened the firewall settings, you can see the option to add the IP address to the firewall whitelist. Here you can enter a single IP address or a range of IP addresses that can access the database.

You can also make multiple entries. There is an option of Add client IP. Clicking on this option will add your current IP address to the firewall whitelist.

cannot open server requested by the login
Adding IP addresses to the database firewall whitelist

After adding the desired IP addresses in the firewall whitelist, click on Save to save the settings. Now you will no longer get this error while trying to access the database. I followed the same steps and was able to connect to my Azure SQL database.

You may also like the following articles:

  • Pause and resume Azure SQL database

In this tutorial, we learned how to fix the error, cannot open server requested by the login. client is not allowed to access the server. This comes when I tried to connect to Azure SQL.

Bijay
Bijay

I am Bijay having more than 15 years of experience in the Software Industry. During this time, I have worked on MariaDB and used it in a lot of projects. Most of our readers are from the United States, Canada, United Kingdom, Australia, New Zealand, etc.

Want to learn MariaDB? Check out all the articles and tutorials that I wrote on MariaDB. Also, I am a Microsoft MVP.

Recent Posts

  • Oracle SDO_TOPO_GEOMETRY Datatype
  • Time Datatype in Oracle Database
  • Oracle urowid Datatype
  • Oracle Year Datatype
  • Oracle Datetime Datatype
  • About Us
  • Contact
  • Privacy Policy
  • Sitemap
© 2023 DatabaseFAQs.com