Skip to content

PHP connection string for mysql db is false #20563

@eiffel-fl

Description

@eiffel-fl

Hi.

I found a bug in azure-cli where php connection string outputted is wrong.
Here is how to reproduce:

docker run -u $(id -u):$(id -g) -v ${HOME}:/home/az -e HOME=/home/az --rm -it mcr.microsoft.com/azure-cli:latest
az login --scope https://management.core.windows.net//.default
az mysql server show-connection-string -s "foo-mysql-server" -o json | jq .connectionStrings.php
"host=foo-mysql-server.mysql.database.azure.com port=3306 dbname={database} user={username}@fran92-mysql-server password={password}"

This string will not permit connection, also on Portal, the following is given:

$con=mysqli_init(); [mysqli_ssl_set($con, NULL, NULL, {ca-cert filename}, NULL, NULL);] mysqli_real_connect($con, "foo-mysql-server.mysql.database.azure.com", "username@foo-mysql-server.mysql.database.azure.com", {your_password}, {your_database}, 3306);

I will deal with this bug, I just opened this issue to remember about it because I do not know when I will exactly deal with it.

Best regards.

Metadata

Metadata

Assignees

Labels

MySQLService AttentionThis issue is responsible by Azure service team.customer-reportedIssues that are reported by GitHub users external to the Azure organization.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions