Answers.Body: <p>It looks like at the present time you will need to make a small hack to get the installer to be happy. The "does the server exist check" does NOT use the username/password and merely tries to connect as anonymous (<a href="https://github.com/civicrm/civicrm-core/blob/5.16.2/install/index.php#L1038" rel="nofollow noreferrer">https://github.com/civicrm/civicrm-core/blob/5.16.2/install/index.php#L1038</a>). On azure this returns an error 9002, as opposed to the usual 1045 which gets skipped by the next line.</p>
  
  <p>So you should be able to temporarily change that line to</p>
  
  <p><code>$conn = $this-&gt;connect($server, 'username@com1group-mysqldbserver.mysql.database.azure.com', 'your password');</code></p>
  
  <p>and then after install you can change it back. I don't have an azure database to test if that is sufficient, but just doing a command line test it returns the usual error 1045 so should work.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-23T12:39:33.227Z
Answers.Text: Not sure I understand the downvote? I saw that azure returns a different error code than usual when passed nulls, verified that if you pass it a proper username and a non-null password it returns the same error code as for other mysql systems when those are passed nulls, and then suggested something to test for the poster to verify on a real setup which I don't have. Is it the word "hack"? If I use the word "change" instead would that be preferred?
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-23T16:26:34.143Z
Answers.Text: I didn't downvote you. I tried to give you an upvote because I appreciate your efforts in trying to figure out what's going on. Given my low reputation for being new, you might not see it publicly. I passed along what you wrote to Azure Customer support.
Answers.UserDisplayName: com1tech
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-23T16:30:33.970Z
Answers.Text: Ok thanks. It's not a problem with azure it needs to be fixed in civicrm, but it would be good to test "the hack" works first.
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-23T18:18:10.027Z
Answers.Text: I tried to test the change to the code. Unfortunately, it didn't work. Instead of seeing the installer page, I got a "The site is experiencing technical difficulties" message when trying to access the installer page.
Answers.UserDisplayName: com1tech
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-23T18:25:54.840Z
Answers.Text: Oops, I forgot to put the ' ' around the data. I'm trying the change again
Answers.UserDisplayName: com1tech
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-23T18:41:02.270Z
Answers.Text: Yessss!!!!!! I got all Green. The issue was me not putting ' ' around the username and password sections. Thank you so much for your help. I hope there are no side effects from trying this change to the code.
Answers.UserDisplayName: com1tech
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-23T18:42:42.797Z
Answers.Text: Great. I'll see about getting it updated in civicrm. Hope there aren't side effects but let us know how it goes. Thanks for testing.
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-23T22:49:18.223Z
Answers.Text: The menu and the dashboard failed to load after installing CiviCRM. I had to go into the Civi Settings file and change the resource URL from /wp-content/plugins/civicrm/civicrm to the full URL. After that CiviCRM loaded fine.
Answers.UserDisplayName: com1tech
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-23T22:54:28.780Z
Answers.Text: Thanks for reporting back. There seem to be a couple outstanding issues still with wordpress that need manual updating depending on the setup, but it's great that it installed at least. I've posted https://lab.civicrm.org/dev/core/issues/1206 and will work on it at some point. If you click the checkmark next to the "0" to the left of the answer it will mark this question answered.
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-22T19:49:27.157Z
Answers.LastActivityDate: 2019-08-23T00:07:07.000Z
Answers.LastEditDate: 2019-08-23T00:07:07.000Z
Answers.UserDisplayName: Demerit
Body: <p>I am trying to install CiviCRM on Azure using the Wordpress for Linux web app and it appears CiviCRM is failing to find the MYSQL server. I've checked many times to see if the database information, including the MYSQL server information, inputted is correct and it's correct. I've even tried variations of the MYSQL server name, including using port numbers at the end, but it's had no impact.</p>
  
  <p><a href="https://i.sstatic.net/BHQSQ.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/BHQSQ.png" alt="enter image description here"></a></p>
  
  <p>I tried to install previous versions of CiviCRM to see if that would help, but the same error continues to show up. A similar question came up a few months ago, but I did not see a clear answer on how to resolve the problem.</p>
  
  <p><a href="https://civicrm.stackexchange.com/questions/28884/your-database-settings-dont-appear-to-be-correct-all-green-but-still-error">Your database settings don&#39;t appear to be correct. All green, but still error!</a></p>
  
  <p>I am wondering if this is a bug with CiviCRM that is specific to Azure or if it's something on Azure's side of things. I don't think it's on the Azure side of things because I can install Wordpress and use MYSQL bench with no issue using the same database information.</p>
  
Tags: <wordpress><error><database><install>
Title: CiviCRM on Azure Not Finding the Server
ThreadText: # CiviCRM on Azure Not Finding the Server
  
  (Asked by: username_0 on 2019-08-22)
  
  I am trying to install CiviCRM on Azure using the Wordpress for Linux web app and it appears CiviCRM is failing to find the MYSQL server. I've checked many times to see if the database information, including the MYSQL server information, inputted is correct and it's correct. I've even tried variations of the MYSQL server name, including using port numbers at the end, but it's had no impact.
  
  [![enter image description here](https://i.sstatic.net/BHQSQ.png)](https://i.sstatic.net/BHQSQ.png)
  
  I tried to install previous versions of CiviCRM to see if that would help, but the same error continues to show up. A similar question came up a few months ago, but I did not see a clear answer on how to resolve the problem.
  
  [Your database settings don't appear to be correct. All green, but still error!](https://civicrm.stackexchange.com/questions/28884/your-database-settings-dont-appear-to-be-correct-all-green-but-still-error)
  
  I am wondering if this is a bug with CiviCRM that is specific to Azure or if it's something on Azure's side of things. I don't think it's on the Azure side of things because I can install Wordpress and use MYSQL bench with no issue using the same database information.
  
  **Tags:** wordpress, error, database, install
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-08-22. Score: 0 | Accepted answer
  
  It looks like at the present time you will need to make a small hack to get the installer to be happy. The "does the server exist check" does NOT use the username/password and merely tries to connect as anonymous (<https://github.com/civicrm/civicrm-core/blob/5.16.2/install/index.php#L1038>). On azure this returns an error 9002, as opposed to the usual 1045 which gets skipped by the next line.
  
  So you should be able to temporarily change that line to
  
  `$conn = $this->connect($server, 'username@com1group-mysqldbserver.mysql.database.azure.com', 'your password');`
  
  and then after install you can change it back. I don't have an azure database to test if that is sufficient, but just doing a command line test it returns the usual error 1045 so should work.
  
  > **Comments:**
  > **username_1**: Not sure I understand the downvote? I saw that azure returns a different error code than usual when passed nulls, verified that if you pass it a proper username and a non-null password it returns the same error code as for other mysql systems when those are passed nulls, and then suggested something to test for the poster to verify on a real setup which I don't have. Is it the word "hack"? If I use the word "change" instead would that be preferred?  
  > **username_0**: I didn't downvote you. I tried to give you an upvote because I appreciate your efforts in trying to figure out what's going on. Given my low reputation for being new, you might not see it publicly. I passed along what you wrote to Azure Customer support.  
  > **username_1**: Ok thanks. It's not a problem with azure it needs to be fixed in civicrm, but it would be good to test "the hack" works first.  
  > **username_0**: I tried to test the change to the code. Unfortunately, it didn't work. Instead of seeing the installer page, I got a "The site is experiencing technical difficulties" message when trying to access the installer page.  
  > **username_0**: Oops, I forgot to put the ' ' around the data. I'm trying the change again  
  > **username_0**: Yessss!!!!!! I got all Green. The issue was me not putting ' ' around the username and password sections. Thank you so much for your help. I hope there are no side effects from trying this change to the code.  
  > **username_1**: Great. I'll see about getting it updated in civicrm. Hope there aren't side effects but let us know how it goes. Thanks for testing.  
  > **username_0**: The menu and the dashboard failed to load after installing CiviCRM. I had to go into the Civi Settings file and change the resource URL from /wp-content/plugins/civicrm/civicrm to the full URL. After that CiviCRM loaded fine.  
  > **username_1**: Thanks for reporting back. There seem to be a couple outstanding issues still with wordpress that need manual updating depending on the setup, but it's great that it installed at least. I've posted https://lab.civicrm.org/dev/core/issues/1206 and will work on it at some point. If you click the checkmark next to the "0" to the left of the answer it will mark this question answered.  
  
  ---
  
  