%3CLINGO-SUB%20id%3D%22lingo-sub-1862876%22%20slang%3D%22en-US%22%3EFlexible%20Server%20for%20MySQL%20%26amp%3B%20Azure%20CLI%20%3A%20Better%20together%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1862876%22%20slang%3D%22en-US%22%3E%3CP%3EHaving%20the%20right%20tools%20can%20help%20improve%20your%20productivity%20as%20you%20build%20applications%20and%20try%20to%20get%20day-to-day%20tasks%20done%20efficiently.%20The%20CLI%20is%20the%20predominantly%20preferred%20by%20developers%20as%20a%20tool%20for%20performing%20everything%20from%20one-time%20tasks%20to%20creating%20automated%20scripts.%20To%20help%20developers%20work%20more%20efficiently%20and%20maximize%20their%20productivity%2C%20we%E2%80%99ve%20made%20many%20improvements%20to%20the%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fazure%2Fmysql%2Fflexible-server%2Foverview%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EAzure%20Database%20for%20MySQL%20Flexible%20Servers%20(Preview)%3C%2FA%3E%20CLI%20experience.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFor%20example%2C%20the%20new%20experience%20includes%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3ERefined%20output%20to%20ensure%20that%20you%E2%80%99re%20informed%20about%20what's%20going%20on%20behind%20the%20scenes.%3C%2FLI%3E%0A%3CLI%3EA%20single%20command%20for%20creating%20a%20secure%20server%20inside%20a%20virtual%20network.%3C%2FLI%3E%0A%3CLI%3EThe%20ability%20to%20use%20contextual%20information%20between%20CLI%20commands%20to%20help%20reduce%20the%20number%20of%20keystrokes%20for%20each%20command.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3ESee%20all%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fcli%2Fazure%2Fmysql%2Fflexible-server%3Fview%3Dazure-cli-latest%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EAzure%20Database%20for%20MySQL%20Flexible%20Server%20CLI%20commands%3C%2FA%3E%20%3CSPAN%3Eto%20get%20started.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--1210251121%22%20id%3D%22toc-hId--1210251121%22%3ELocal%20context%20support%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFlexible%20Server%20CLI%20commands%20support%20local%20context%20with%20the%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fcli%2Fazure%2Fconfig%2Fparam-persist%3Fview%3Dazure-cli-latest%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Eaz%20config%20param-persist%3C%2FA%3E%20command%2C%20which%20locally%20stores%20information%20such%20as%20region%2C%20resource%20group%2C%20subscription%20ID%2C%20resource%20name%2C%20etc.%2C%20for%20every%20sequential%20CLI%20command%20you%20run.%20You%20can%20easily%20turn%20on%20local%20context%20to%20store%20information%20by%20using%20the%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fcli%2Fazure%2Fconfig%2Fparam-persist%3Fview%3Dazure-cli-latest%23az_config_param_persist_on%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Eaz%20config%20param-persist%20on%3C%2FA%3E%20command.%20If%20local%20context%20is%20turned%20on%2C%20you%20can%20see%20the%20contextual%20information%20by%20using%20the%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fcli%2Fazure%2Fconfig%2Fparam-persist%3Fview%3Dazure-cli-latest%23az_config_param_persist_show%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Eaz%20config%20param-persist%20show%3C%2FA%3E%20command.%20You%20can%20always%20turn%20off%20local%20context%20by%20using%20the%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fcli%2Fazure%2Fconfig%2Fparam-persist%3Fview%3Dazure-cli-latest%23az_config_param_persist_off%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Eaz%20config%20param-persist%20off%3C%2FA%3E%20command.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CSTRONG%3E%3CCODE%20style%3D%22color%3A%20black%3B%22%3Ejane%40Azure%3A%20~%24%20az%20config%20param-persist%20show%0A%3C%2FCODE%3E%3C%2FSTRONG%3E%3CCODE%20style%3D%22color%3A%20black%3B%22%3ECommand%20group%20'config%20param-persist'%20is%20experimental%20and%20not%20covered%20by%20customer%20support.%3CBR%20%2F%3E%7B%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FCODE%3E%3CCODE%20style%3D%22color%3A%20black%3B%22%3E%22all%22%3A%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FCODE%3E%3CCODE%20style%3D%22color%3A%20black%3B%22%3E%7B%26nbsp%3B%20%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FCODE%3E%3CCODE%20style%3D%22color%3A%20black%3B%22%3E%26nbsp%3B%22location%22%3A%22eastus%22%2C%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FCODE%3E%3CCODE%20style%3D%22color%3A%20black%3B%22%3E%22resource_group_name%22%3A%22mynewproject%22%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FCODE%3E%3CCODE%20style%3D%22color%3A%20black%3B%22%3E%7D%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FCODE%3E%3CCODE%20style%3D%22color%3A%20black%3B%22%3E%3CBR%20%2F%3E%3C%2FCODE%3E%3CCODE%20style%3D%22color%3A%20black%3B%22%3E%7D%0A%20%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CH1%20id%3D%22toc-hId--1220754225%22%20id%3D%22toc-hId--1220754225%22%3E%26nbsp%3B%3C%2FH1%3E%0A%3CH2%20id%3D%22toc-hId--530192751%22%20id%3D%22toc-hId--530192751%22%3EEase%20of%20provisioning%20and%20deprovisioning%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWhen%20creating%20a%20MySQL%20server%20using%20our%20managed%20database%20service%20on%20Azure%2C%20you%E2%80%99ll%20probably%20want%20to%20get%20started%20quickly%2C%20especially%20if%20you're%20just%20trying%20things%20out.%20With%20the%20new%20and%20improved%20Azure%20CLI%20for%20Flexible%20Server%20on%20Azure%20Database%20for%20MySQL%2C%20you%20can%20quickly%20create%20a%20MySQL%20server%20inside%20a%20virtual%20network.%20If%20you%20prefer%2C%20you%20can%20also%20easily%20provision%20a%20server%20with%20firewall%20rules%20in%20a%20single%20step.%20You%20can%20also%20view%20the%20progress%20visually%20as%20CLI%20commands%20to%20keep%20informed%20about%20what's%20going%20on%20behind%20the%20scenes.%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-160368723%22%20id%3D%22toc-hId-160368723%22%3E%26nbsp%3B%3C%2FH3%3E%0A%3CH3%20id%3D%22toc-hId--1647085740%22%20id%3D%22toc-hId--1647085740%22%3E%3CSTRONG%3ECreate%20a%20MySQL%20Flexible%20Server%20inside%20a%20new%20virtual%20network%3C%2FSTRONG%3E%3C%2FH3%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ERather%20than%20using%20separate%20commands%20to%20create%20a%20resource%20group%2C%20a%20virtual%20network%2C%20and%20a%20subnet%2C%20you%20can%20use%20the%20%3CSTRONG%3E%3CEM%3Eaz%20mysql%20flexible-server%20create%3C%2FEM%3E%3C%2FSTRONG%3E%20command%20as%20shown%20below%20to%20create%20a%20secure%20MySQL%20Flexible%20Server%20inside%20a%20new%20virtual%20network%20and%20have%20a%20new%20subnet%20delegated%20to%20the%20server.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CSTRONG%3Ejane%40Azure%3A~%24%20az%20mysql%20flexible-server%20create%3C%2FSTRONG%3E%3CBR%20%2F%3ELocal%20context%20is%20turned%20on.%20Its%20information%20is%20saved%20in%20working%20directory%20%2Fhome%2Fjane.%20You%20can%20run%20%60az%20local-context%20off%60%20to%20turn%20it%20off.%3CBR%20%2F%3ECommand%20argument%20values%20from%20local%20context%3A%20--resource-group%3A%20mynewproject%2C%20--location%3A%20eastus%3CBR%20%2F%3ECommand%20group%20'mysql%20flexible-server'%20is%20in%20preview.%20It%20may%20be%20changed%2Fremoved%20in%20a%20future%20release.%3CBR%20%2F%3EChecking%20the%20existence%20of%20the%20resource%20group%20'mynewproject'...%3CBR%20%2F%3EResource%20group%20'mynewproject'%20exists%20%3F%20%3A%20True%3CBR%20%2F%3ECreating%20new%20vnet%20%22VNET206094752%22%20in%20resource%20group%20%22mynewproject%22...%3CBR%20%2F%3ECreating%20new%20subnet%20%22Subnet206094752%22%20in%20resource%20group%20%22mynewproject%22%20and%20delegating%20it%20to%20%22Microsoft.DBforMySQL%2FflexibleServers%22...%3CBR%20%2F%3ECreating%20MySQL%20Server%20'server206094752'%20in%20group%20'mynewproject'...%3CBR%20%2F%3EYour%20server%20'server206094752'%20is%20using%20sku%20'Standard_B1ms'%20(Paid%20Tier).%20Please%20refer%20to%20https%3A%2F%2Faka.ms%2Fmysql-pricing%20for%20pricing%20details%3CBR%20%2F%3ECreating%20MySQL%20database%20'flexibleserverdb'...%3CBR%20%2F%3EMake%20a%20note%20of%20your%20password.%20If%20you%20forget%2C%20you%20would%20have%20to%20reset%20your%20password%20with'az%20mysql%20flexible-server%20update%20-n%20server206094752%20-g%20mynewproject%20-p%20%3CNEW-PASSWORD%3E'.%3CBR%20%2F%3E%3CBR%20%2F%3E%7B%3CBR%20%2F%3E%22connectionString%22%3A%20%22mysql%20flexibleserverdb%20--host%20server206094752.mysql.database.azure.com%20--user%20your-username%20--password%3D'your-password'%22%2C%3CBR%20%2F%3E%22databaseName%22%3A%20%22flexibleserverdb%22%2C%3CBR%20%2F%3E%22host%22%3A%20%22server206094752.mysql.database.azure.com%22%2C%3CBR%20%2F%3E%22id%22%3A%20%22%2Fsubscriptions%2Fxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx%2FresourceGroups%2Fmynewproject%2Fproviders%2FMicrosoft.DBforMySQL%2FflexibleServers%2Fserver206094752%22%2C%3CBR%20%2F%3E%22location%22%3A%20%22East%20US%22%2C%3CBR%20%2F%3E%22password%22%3A%20%22your-password%22%2C%3CBR%20%2F%3E%22resourceGroup%22%3A%20%22mynewproject%22%2C%3CBR%20%2F%3E%22skuname%22%3A%20%22Standard_B1ms%22%2C%3CBR%20%2F%3E%22subnetId%22%3A%20%22%2Fsubscriptions%2Fxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx%2FresourceGroups%2Fmynewproject%2Fproviders%2FMicrosoft.Network%2FvirtualNetworks%2FVNET206094752%2Fsubnets%2FSubnet206094752%22%2C%3CBR%20%2F%3E%22username%22%3A%20%22your-username%22%2C%3CBR%20%2F%3E%22version%22%3A%20%225.7%22%3CBR%20%2F%3E%7D%3C%2FNEW-PASSWORD%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-840427093%22%20id%3D%22toc-hId-840427093%22%3E%3CSTRONG%3ECreate%20a%20MySQL%20Flexible%20Server%20with%20public%20access%20to%20all%20IPs%3C%2FSTRONG%3E%3C%2FH3%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EUse%20the%20%3CSTRONG%3E%3CEM%3Eaz%20mysql%20flexible-server%20create%20%E2%80%93public-access%20all%3C%2FEM%3E%3C%2FSTRONG%3E%20command%20to%20create%20a%20publicly%20accessible%20MySQL%20server.%20A%20publicly%20accessible%20server%20can%20be%20accessed%20from%20any%20client%20computer%20using%20the%20correct%20username%20and%20password.%26nbsp%3BTo%20restrict%20access%20only%20to%20your%20IP%20set%2C%20use%20the%20%3CSTRONG%3E%3CEM%3E--public%20-access%3C%2FEM%3E%3C%2FSTRONG%3E%20argument%20to%20scope%20it%20either%20your%20%3CIP%3E%20or%20a%20range%20of%20IP%20addresses%2C%20%3CSTART%20ip%3D%22%22%20address%3D%22%22%20-%3D%22%22%20end%3D%22%22%20ip%3D%22%22%20address%3D%22%22%3E.%3C%2FSTART%3E%3C%2FIP%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CSTRONG%3Ejane%40Azure%3A~%24%20az%20mysql%20flexible-server%20create%20--public-access%20all%3C%2FSTRONG%3E%3CBR%20%2F%3ELocal%20context%20is%20turned%20on.%20Its%20information%20is%20saved%20in%20working%20directory%20%2Fhome%2Fsunitha.%20You%20can%20run%20%60az%20local-context%20off%60%20to%20turn%20it%20off.%3CBR%20%2F%3ECommand%20argument%20values%20from%20local%20context%3A%20--resource-group%3A%20mynewproject%2C%20--location%3A%20eastus%3CBR%20%2F%3ECommand%20group%20'mysql%20flexible-server'%20is%20in%20preview.%20It%20may%20be%20changed%2Fremoved%20in%20a%20future%20release.%3CBR%20%2F%3EChecking%20the%20existence%20of%20the%20resource%20group%20'mynewproject'...%3CBR%20%2F%3EResource%20group%20'mynewproject'%20exists%20%3F%20%3A%20True%3CBR%20%2F%3ECreating%20MySQL%20Server%20'server809097150'%20in%20group%20'mynewproject'...%3CBR%20%2F%3EYour%20server%20'server809097150'%20is%20using%20sku%20'Standard_B1ms'%20(Paid%20Tier).%20Please%20refer%20to%20https%3A%2F%2Faka.ms%2Fmysql-pricing%20for%20pricing%20details%3CBR%20%2F%3EConfiguring%20server%20firewall%20rule%20to%20accept%20connections%20from%20'0.0.0.0'%20to%20'255.255.255.255'...%3CBR%20%2F%3ECreating%20MySQL%20database%20'flexibleserverdb'...%3CBR%20%2F%3EMake%20a%20note%20of%20your%20password.%20If%20you%20forget%2C%20you%20would%20have%20to%20reset%20your%20password%20with'az%20mysql%20flexible-server%20update%20-n%20server809097150%20-g%20mynewproject%20-p%20%3CNEW-PASSWORD%3E'.%3CBR%20%2F%3E%7B%3CBR%20%2F%3E%22connectionString%22%3A%20%22mysql%20flexibleserverdb%20--host%20server809097150.mysql.database.azure.com%20--user%20your-username%20--password%3D'your-password'%22%2C%3CBR%20%2F%3E%22databaseName%22%3A%20%22flexibleserverdb%22%2C%3CBR%20%2F%3E%22firewallName%22%3A%20%22AllowAll_2020-11-11_20-59-12%22%2C%3CBR%20%2F%3E%22host%22%3A%20%22server809097150.mysql.database.azure.com%22%2C%3CBR%20%2F%3E%22id%22%3A%20%22%2Fsubscriptions%2Fxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx%2FresourceGroups%2Fmynewproject%2Fproviders%2FMicrosoft.DBforMySQL%2FflexibleServers%2Fserver809097150%22%2C%3CBR%20%2F%3E%22location%22%3A%20%22East%20US%22%2C%3CBR%20%2F%3E%22password%22%3A%20%22your-password%22%2C%3CBR%20%2F%3E%22resourceGroup%22%3A%20%22mynewproject%22%2C%3CBR%20%2F%3E%22skuname%22%3A%20%22Standard_B1ms%22%2C%3CBR%20%2F%3E%22username%22%3A%20%22your-username%22%2C%3CBR%20%2F%3E%22version%22%3A%20%225.7%22%3CBR%20%2F%3E%7D%3C%2FNEW-PASSWORD%3E%3C%2FPRE%3E%0A%3CP%20class%3D%22lia-align-center%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--967027370%22%20id%3D%22toc-hId--967027370%22%3E%3CSTRONG%3EDelete%20the%20server%20when%20using%20local%20context%3C%2FSTRONG%3E%3C%2FH3%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EUse%20the%20%3CSTRONG%3E%3CEM%3Eaz%20mysql%20flexible-server%20delete%3C%2FEM%3E%3C%2FSTRONG%3E%20command%20to%20delete%20any%20MySQL%20Flexible%20Server%20identified%20in%20the%20local%20context.%20In%20the%20example%20below%2C%20the%20command%20identifies%20%3CEM%3Eserver210976926%3C%2FEM%3E%20in%20the%20local%20context%20and%20then%20tries%20to%20delete%20that%20server.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CSTRONG%3Ejane%40Azure%3A~%24%20az%20mysql%20flexible-server%20delete%3C%2FSTRONG%3E%3CBR%20%2F%3ELocal%20context%20is%20turned%20on.%20Its%20information%20is%20saved%20in%20working%20directory%20%2Fhome%2Fjane.%20You%20can%20run%20%60az%20local-context%20off%60%20to%20turn%20it%20off.%3CBR%20%2F%3ECommand%20argument%20values%20from%20local%20context%3A%20--resource-group%3A%20mynewproject%2C%20--name%3A%20server206094752%3CBR%20%2F%3ECommand%20group%20'mysql%20flexible-server'%20is%20in%20preview.%20It%20may%20be%20changed%2Fremoved%20in%20a%20future%20release.%3CBR%20%2F%3EAre%20you%20sure%20you%20want%20to%20delete%20the%20server%20'server206094752'%20in%20resource%20group%20'mynewproject'%20(y%2Fn)%3A%20y%3C%2FPRE%3E%0A%3CP%20class%3D%22lia-align-center%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--977530474%22%20id%3D%22toc-hId--977530474%22%3ETune%20your%20MySQL%20server%26nbsp%3B%3C%2FH2%3E%0A%3CP%3ETuning%20MySQL%20database%20parameters%20is%20important%20when%20configuring%20your%20server%20to%20meet%20your%20application%E2%80%99s%20needs%2C%20or%20even%20to%20optimize%20performance.%20You%20can%20use%20the%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fcli%2Fazure%2Fmysql%2Fflexible-server%2Fparameter%3Fview%3Dazure-cli-latest%23az_mysql_flexible_server_parameter_set%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Eparameter%20set%3C%2FA%3E%20command%20to%20easily%20update%20server%20parameters%20with%20ease%20.%20You%20can%20view%20all%20the%20server%20parameter%20with%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fcli%2Fazure%2Fmysql%2Fflexible-server%2Fparameter%3Fview%3Dazure-cli-latest%23az_mysql_flexible_server_parameter_list%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Eparameter%20list%3C%2FA%3E%20and%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fcli%2Fazure%2Fmysql%2Fflexible-server%2Fparameter%3Fview%3Dazure-cli-latest%23az_mysql_flexible_server_parameter_show%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Eparameter%20show%3C%2FA%3E%20commands%20to%20view%20the%20values%20of%20a%20specific%20server%20parameter.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-align-left%22%3E%3CSTRONG%3Ejane%40Azure%3A~%24%20az%20mysql%20flexible-server%20parameter%20set%20--name%20audit_log_enabled%20--value%20ON%3C%2FSTRONG%3E%3CBR%20%2F%3ELocal%20context%20is%20turned%20on.%20Its%20information%20is%20saved%20in%20working%20directory%20%2Fhome%2Fjane.%20You%20can%20run%20%60az%20local-context%20off%60%20to%20turn%20it%20off.%3CBR%20%2F%3ECommand%20argument%20values%20from%20local%20context%3A%20--server-name%3A%20server206094752%2C%20--resource-group%3A%20mynewproject%3CBR%20%2F%3ECommand%20group%20'mysql%20flexible-server%20parameter'%20is%20in%20preview.%20It%20may%20be%20changed%2Fremoved%20in%20a%20future%20release.%3CBR%20%2F%3E%7B-%20Finished%20..%3CBR%20%2F%3E%22allowedValues%22%3A%20%22ON%2COFF%22%2C%3CBR%20%2F%3E%22dataType%22%3A%20%22Enumeration%22%2C%3CBR%20%2F%3E%22defaultValue%22%3A%20%22OFF%22%2C%3CBR%20%2F%3E%22description%22%3A%20%22Allow%20to%20audit%20the%20log.%22%2C%3CBR%20%2F%3E%22id%22%3A%20%22%2Fsubscriptions%2Fxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx%2FresourceGroups%2Fmynewproject%2Fproviders%2FMicrosoft.DBforMySQL%2FflexibleServers%2Fserver206094752%2Fconfigurations%2Faudit_log_enabled%22%2C%3CBR%20%2F%3E%22isConfigPendingRestart%22%3A%20%22True%22%2C%3CBR%20%2F%3E%22isDynamicConfig%22%3A%20%22True%22%2C%3CBR%20%2F%3E%22isReadOnly%22%3A%20%22False%22%2C%3CBR%20%2F%3E%22name%22%3A%20%22audit_log_enabled%22%2C%3CBR%20%2F%3E%22resourceGroup%22%3A%20%22mynewproject%22%2C%3CBR%20%2F%3E%22source%22%3A%20%22user-override%22%2C%3CBR%20%2F%3E%22type%22%3A%20%22Microsoft.DBforMySQL%2FflexibleServers%2Fconfigurations%22%2C%3CBR%20%2F%3E%22value%22%3A%20%22ON%22%3CBR%20%2F%3E%7D%3C%2FPRE%3E%0A%3CH2%20id%3D%22toc-hId-1509982359%22%20id%3D%22toc-hId-1509982359%22%3E%26nbsp%3B%3C%2FH2%3E%0A%3CH2%20id%3D%22toc-hId--297472104%22%20id%3D%22toc-hId--297472104%22%3EUse%20powerful%20Azure%20CLI%20utilities%20with%20flexible%20server%20CLI%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHere%20are%20few%20more%20powerful%20things%20that%20you%20can%20do%20when%20using%20the%20Azure%20CLI%20with%20MySQL%20Flexible%20Server%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EUse%20the%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fcli%2Fazure%2Freference-index%3Fview%3Dazure-cli-latest%23az_find%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Eaz%20find%3C%2FA%3E%20command%20to%20find%20a%20specific%20command.%3C%2FLI%3E%0A%3CLI%3EUse%20the%20%3CEM%3E--help%3C%2FEM%3E%20argument%20to%20get%20a%20complete%20list%20of%20commands%20and%20subgroups%20of%20a%20group.%3C%2FLI%3E%0A%3CLI%3EChange%20the%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fcli%2Fazure%2Fformat-output-azure-cli%3Fview%3Dazure-cli-latest%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Eoutput%20formatting%3C%2FA%3E%20to%20%3CEM%3Etable%3C%2FEM%3E%20or%20%3CEM%3Etsv%3C%2FEM%3E%20or%20%3CEM%3Eyaml%20%3C%2FEM%3Eformats.%3C%2FLI%3E%0A%3CLI%3EUse%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fcli%2Fazure%2Finteractive-azure-cli%3Fview%3Dazure-cli-latesthttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fcli%2Fazure%2Finteractive-azure-cli%3Fview%3Dazure-cli-latest%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Eaz%20interactive%3C%2FA%3E%20mode%2C%20which%20provides%20an%20interactive%20shell%20with%20auto-completion%2C%20command%20descriptions%2C%20and%20examples.%3C%2FLI%3E%0A%3CLI%3EUse%20the%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fcli%2Fazure%2Freference-index%3Fview%3Dazure-cli-latest%23az_upgradehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fcli%2Fazure%2Freference-index%3Fview%3Dazure-cli-latest%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Eaz%20upgrade%3C%2FA%3E%20command%20to%20update%20your%20CLI%20and%20extensions.%3C%2FLI%3E%0A%3CLI%3EUse%20the%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fcli%2Fazure%2Freference-index%3Fview%3Dazure-cli-latest%23az_rest%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Eaz%20rest%3C%2FA%3E%20command%20to%20call%20your%20service%20endpoints%20to%20run%20GET%20%2C%20PUT%20%2C%20PATCH%20methods%20in%20a%20secure%20way%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThese%20changes%20have%20been%20designed%20to%20support%20the%20best%20possible%20experience%20for%20developers%20when%20creating%20and%20managing%20their%20MySQL%20servers.%20We%E2%80%99d%20love%20for%20you%20to%20try%20out%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fcli%2Fazure%2Fmysql%2Fflexible-server%3Fview%3Dazure-cli-latest%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EAzure%20Database%20for%20MySQL%20Flexible%20Server%20CLI%20commands%3C%2FA%3E%20and%20%3CA%20href%3D%22https%3A%2F%2Faka.ms%2Fmysql-cli-feedback%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Eshare%20any%20feedback%3C%2FA%3E%20you%20might%20have%20on%20the%20new%20or%20existing%20CLI%20commands.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-1862876%22%20slang%3D%22en-US%22%3E%3CP%3EThe%20new%20Flexible%20Server%20(Preview)%20deployment%20option%20for%20Azure%20Database%20for%20MySQL%20increases%20your%20control%20of%20the%20database%20and%20enhances%20your%20productivity.%20Check%20out%20these%20tips%20when%20working%20with%20flexible%20servers%20using%20Azure%20CLI.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22mk_sunitha_0-1605211938680.png%22%20style%3D%22width%3A%20938px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F233271i1C4449EBCBE6C2D4%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22mk_sunitha_0-1605211938680.png%22%20alt%3D%22screenshot-welcome-azure-cli-postgres-blog%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3Escreenshot-welcome-azure-cli-postgres-blog%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%20id%3D%22lia-teaserTinyMceEditormk_sunitha_7%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%20id%3D%22lia-teaserTinyMceEditormk_sunitha_8%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%20id%3D%22lia-teaserTinyMceEditormk_sunitha_11%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1862876%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3Ecli%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFlexible%20Server%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMySQL%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft

Having the right tools can help improve your productivity as you build applications and try to get day-to-day tasks done efficiently. The CLI is the predominantly preferred by developers as a tool for performing everything from one-time tasks to creating automated scripts. To help developers work more efficiently and maximize their productivity, we’ve made many improvements to the Azure Database for MySQL Flexible Servers (Preview) CLI experience.

 

For example, the new experience includes:

  • Refined output to ensure that you’re informed about what's going on behind the scenes.
  • A single command for creating a secure server inside a virtual network.
  • The ability to use contextual information between CLI commands to help reduce the number of keystrokes for each command.

See all Azure Database for MySQL Flexible Server CLI commands to get started.

 

Local context support

 

Flexible Server CLI commands support local context with the az config param-persist command, which locally stores information such as region, resource group, subscription ID, resource name, etc., for every sequential CLI command you run. You can easily turn on local context to store information by using the az config param-persist on command. If local context is turned on, you can see the contextual information by using the az config param-persist show command. You can always turn off local context by using the az config param-persist off command.

 

jane@Azure: ~$ az config param-persist show
Command group 'config param-persist' is experimental and not covered by customer support.
{    
"all":
     

      
 "location":"eastus",
       
"resource_group_name":"mynewproject"
     
}   
}

 

Ease of provisioning and deprovisioning

 

When creating a MySQL server using our managed database service on Azure, you’ll probably want to get started quickly, especially if you're just trying things out. With the new and improved Azure CLI for Flexible Server on Azure Database for MySQL, you can quickly create a MySQL server inside a virtual network. If you prefer, you can also easily provision a server with firewall rules in a single step. You can also view the progress visually as CLI commands to keep informed about what's going on behind the scenes.

 

Create a MySQL Flexible Server inside a new virtual network

 

Rather than using separate commands to create a resource group, a virtual network, and a subnet, you can use the az mysql flexible-server create command as shown below to create a secure MySQL Flexible Server inside a new virtual network and have a new subnet delegated to the server.

 

jane@Azure:~$ az mysql flexible-server create
Local context is turned on. Its information is saved in working directory /home/jane. You can run `az local-context off` to turn it off.
Command argument values from local context: --resource-group: mynewproject, --location: eastus
Command group 'mysql flexible-server' is in preview. It may be changed/removed in a future release.
Checking the existence of the resource group 'mynewproject'...
Resource group 'mynewproject' exists ? : True
Creating new vnet "VNET206094752" in resource group "mynewproject"...
Creating new subnet "Subnet206094752" in resource group "mynewproject" and delegating it to "Microsoft.DBforMySQL/flexibleServers"...
Creating MySQL Server 'server206094752' in group 'mynewproject'...
Your server 'server206094752' is using sku 'Standard_B1ms' (Paid Tier). Please refer to https://aka.ms/mysql-pricing for pricing details
Creating MySQL database 'flexibleserverdb'...
Make a note of your password. If you forget, you would have to reset your password with'az mysql flexible-server update -n server206094752 -g mynewproject -p <new-password>'.

{
"connectionString": "mysql flexibleserverdb --host server206094752.mysql.database.azure.com --user your-username --password='your-password'",
"databaseName": "flexibleserverdb",
"host": "server206094752.mysql.database.azure.com",
"id": "/subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/resourceGroups/mynewproject/providers/Microsoft.DBforMySQL/flexibleServers/server206094752",
"location": "East US",
"password": "your-password",
"resourceGroup": "mynewproject",
"skuname": "Standard_B1ms",
"subnetId": "/subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/resourceGroups/mynewproject/providers/Microsoft.Network/virtualNetworks/VNET206094752/subnets/Subnet206094752",
"username": "your-username",
"version": "5.7"
}

 

 

Create a MySQL Flexible Server with public access to all IPs

 

Use the az mysql flexible-server create –public-access all command to create a publicly accessible MySQL server. A publicly accessible server can be accessed from any client computer using the correct username and password. To restrict access only to your IP set, use the --public -access argument to scope it either your <IP – address> or a range of IP addresses, <Start IP address - End IP address>.

 

jane@Azure:~$ az mysql flexible-server create --public-access all
Local context is turned on. Its information is saved in working directory /home/sunitha. You can run `az local-context off` to turn it off.
Command argument values from local context: --resource-group: mynewproject, --location: eastus
Command group 'mysql flexible-server' is in preview. It may be changed/removed in a future release.
Checking the existence of the resource group 'mynewproject'...
Resource group 'mynewproject' exists ? : True
Creating MySQL Server 'server809097150' in group 'mynewproject'...
Your server 'server809097150' is using sku 'Standard_B1ms' (Paid Tier). Please refer to https://aka.ms/mysql-pricing for pricing details
Configuring server firewall rule to accept connections from '0.0.0.0' to '255.255.255.255'...
Creating MySQL database 'flexibleserverdb'...
Make a note of your password. If you forget, you would have to reset your password with'az mysql flexible-server update -n server809097150 -g mynewproject -p <new-password>'.
{
"connectionString": "mysql flexibleserverdb --host server809097150.mysql.database.azure.com --user your-username --password='your-password'",
"databaseName": "flexibleserverdb",
"firewallName": "AllowAll_2020-11-11_20-59-12",
"host": "server809097150.mysql.database.azure.com",
"id": "/subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/resourceGroups/mynewproject/providers/Microsoft.DBforMySQL/flexibleServers/server809097150",
"location": "East US",
"password": "your-password",
"resourceGroup": "mynewproject",
"skuname": "Standard_B1ms",
"username": "your-username",
"version": "5.7"
}

 

Delete the server when using local context

 

Use the az mysql flexible-server delete command to delete any MySQL Flexible Server identified in the local context. In the example below, the command identifies server210976926 in the local context and then tries to delete that server.

 

jane@Azure:~$ az mysql flexible-server delete
Local context is turned on. Its information is saved in working directory /home/jane. You can run `az local-context off` to turn it off.
Command argument values from local context: --resource-group: mynewproject, --name: server206094752
Command group 'mysql flexible-server' is in preview. It may be changed/removed in a future release.
Are you sure you want to delete the server 'server206094752' in resource group 'mynewproject' (y/n): y

 

Tune your MySQL server 

Tuning MySQL database parameters is important when configuring your server to meet your application’s needs, or even to optimize performance. You can use the parameter set command to easily update server parameters with ease . You can view all the server parameter with parameter list and parameter show commands to view the values of a specific server parameter.

 

jane@Azure:~$ az mysql flexible-server parameter set --name audit_log_enabled --value ON
Local context is turned on. Its information is saved in working directory /home/jane. You can run `az local-context off` to turn it off.
Command argument values from local context: --server-name: server206094752, --resource-group: mynewproject
Command group 'mysql flexible-server parameter' is in preview. It may be changed/removed in a future release.
{- Finished ..
"allowedValues": "ON,OFF",
"dataType": "Enumeration",
"defaultValue": "OFF",
"description": "Allow to audit the log.",
"id": "/subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/resourceGroups/mynewproject/providers/Microsoft.DBforMySQL/flexibleServers/server206094752/configurations/audit_log_enabled",
"isConfigPendingRestart": "True",
"isDynamicConfig": "True",
"isReadOnly": "False",
"name": "audit_log_enabled",
"resourceGroup": "mynewproject",
"source": "user-override",
"type": "Microsoft.DBforMySQL/flexibleServers/configurations",
"value": "ON"
}

 

Use powerful Azure CLI utilities with flexible server CLI

 

Here are few more powerful things that you can do when using the Azure CLI with MySQL Flexible Server:

  • Use the az find command to find a specific command.
  • Use the --help argument to get a complete list of commands and subgroups of a group.
  • Change the output formatting to table or tsv or yaml formats.
  • Use az interactive mode, which provides an interactive shell with auto-completion, command descriptions, and examples.
  • Use the az upgrade command to update your CLI and extensions.
  • Use the az rest command to call your service endpoints to run GET , PUT , PATCH methods in a secure way

 

These changes have been designed to support the best possible experience for developers when creating and managing their MySQL servers. We’d love for you to try out Azure Database for MySQL Flexible Server CLI commands and share any feedback you might have on the new or existing CLI commands.