Doubt of connection string between azure and php

0

Greetings, I have a question:

I have a mysql database in azure and I want to connect it with php but I do not know how. I have this command but I do not know why to replace where it says "localhost" and $ db. Thanks in advance.

<?php
    $user = "root";
    $pass = "";
    $db = "db";

    $db = new mysqli("localhost", $user, $pass, $db) or die("Unable to connect");

    echo"Great work!"

?>
    
asked by Daniel Vargas 07.05.2017 в 00:50
source

1 answer

0

You must search the Azure portal for the MySQL service, in case it is native to Azure. If it is administered by ClearBD you must enter the ClearDB portal and inside it will be the name of the server and database.

    
answered by 20.06.2017 в 18:25