Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

az mysql flexible-server create creates server that cannot connect into #30968

Open
hgjura opened this issue Mar 6, 2025 · 3 comments
Open
Labels
Auto-Assign Auto assign by bot bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported Issues that are reported by GitHub users external to the Azure organization. MySQL Service Attention This issue is responsible by Azure service team. Similar-Issue

Comments

@hgjura
Copy link

hgjura commented Mar 6, 2025

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

@hgjura hgjura added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Mar 6, 2025
@yonzhan
Copy link
Collaborator

yonzhan commented Mar 6, 2025

Thank you for opening this issue, we will look into it.

@microsoft-github-policy-service microsoft-github-policy-service bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. Auto-Assign Auto assign by bot MySQL Service Attention This issue is responsible by Azure service team. labels Mar 6, 2025
Copy link

github-actions bot commented Mar 6, 2025

Here are some similar issues that might help you. Please check if they can solve your problem.

Powered by issue-sentinel

Copy link
Contributor

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @ambhatna, @savjani.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Assign Auto assign by bot bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported Issues that are reported by GitHub users external to the Azure organization. MySQL Service Attention This issue is responsible by Azure service team. Similar-Issue
Projects
None yet
Development

No branches or pull requests

2 participants