I have deployed a php website to azure. It has a connection string like this:
$host = 'localhost';
$username = 'xxxxx';
$password = 'xxxxx';
$database = 'xxxxx';
$con = mysql_connect($host, $username, $password);
I need to change this when it is deployed so it points to the ClearDB Mysql database. I have found the endpoint details for that are as follows:
Database=XXXX;Data Source=eu-cdbr-azure-north-c.XXXX.net;User Id=XXXX;Password=XXXX
This article here describes how to create a connection string using Environment Variables.
But I am not sure how to make this work with a mysql_connect() function. I have tried substituting the values for host, username, password, and db with the details provided by Microsoft for the cleardb database but I receive an error 'An attempt was made to access a socket in a way forbidden by its access permissions '
Many thanks in advance for any suggestions.