Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to locate Azure MySQL database connection string?

After creating a new website in Azure (Standard S1 tier), new MySQL resources were linked.

Upon entering DB's name and saving its location, the resource with status Linked in Linked Resources tab of the web site portal becomes visible.

When navigating to the Configure tab, the connection string is not visible.

In addition to that, when going to the Dashboard tab and clicking on View Connection Strings, a message: "You have no connection strings" is displayed.

How do I resolve this issue?

like image 921
Artak Khachatryan Avatar asked Feb 24 '15 08:02

Artak Khachatryan


1 Answers

I just created a new websites and a new linked MySQL database to verify your problem.

After creating the database I can see it on the "Linked resources" tab. On the "Configure" tab I can see the connection string after that I press the "Show connection strings" link. Also, on the "Dashboard" tab I can see it when pressing the "View connection strings" link.

You can also check the connection string if you go to Kudu and check the configuration file for your site. Go to http://YOUR_SITE_NAME.scm.azurewebsites.net/Env#connectionStrings to see the configured connection strings.

I'm not sure what has happened if you are not able to see any configured connection strings. My guess is that something went wrong when saving the web sites settings or creating the database.

I had recently a similar situation when I created a new api app. For me, deleting and re-creating it, solved my problems.

like image 192
kim Avatar answered Oct 23 '22 22:10

kim