-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Open
Labels
Auto-AssignAuto assign by botAuto assign by botMySQLService AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.Similar-IssuebugThis issue requires a change to an existing behavior in the product in order to be resolved.This issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.
Description
Describe the bug
The command az mysql flexible-server create creates a server in a state that mysql client cannot connect into. This is done in a Azure DevOps pipeline.
Here is the full script:
az mysql flexible-server create --resource-group $resourcegroup \
--name $sername \
--location $location \
--admin-user $adminusername \
--admin-password $adminpassword \
--sku-name $sku \
--version $mysqlversion \
--yes \
--tags CreatedBy=AzDO
az mysql flexible-server firewall-rule create --resource-group $resourcegroup \
--name $sername \
--rule-name AllowAllIPs \
--start-ip-address 0.0.0.0 \
--end-ip-address 255.255.255.255
#THIS LINE WORKS. MEANING SERVER IS CREATED AND THIS COMMAND DOESN'T FAIL
az mysql flexible-server connect -n $sername -u $adminusername -p $adminpassword -d flexibleserverdb
#THIS FOLLOWING LINE FAILS WITH CONECTION REFUSED ERROR
#IDENTICAL SETUP CREATED MANUALLY WORKS
#ANY MYSQL COMMAND FAILS
mysql --host=$sername.mysql.database.azure.com \
--user=$adminusername@$sername \
--password=$adminpassword \
--execute="DROP DATABASE IF EXISTS flexibleserverdb;"
mysql --host=$sername.mysql.database.azure.com \
--user=$adminusername@$sername \
--password=$adminpassword \
--ssl-mode=REQUIRED \
--execute="CREATE DATABASE $dbname;"
Related command
az mysql flexible-server create
Errors
Connection refused or connection error
Issue script & Debug output
Connection refused or connection error
Expected behavior
mysql client should be able to connect and run commands
Environment Summary
azure-cli 2.70.0
mysql version 8.0
Additional context
No response
Metadata
Metadata
Assignees
Labels
Auto-AssignAuto assign by botAuto assign by botMySQLService AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.Similar-IssuebugThis issue requires a change to an existing behavior in the product in order to be resolved.This issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.