Skip to content

[RDBMS] Add flexible-server connect command - #15419

Merged
Yong Zhang (yonzhan) merged 18 commits into
Azure:devfrom
mjain2:mjain2/flexConnect
Oct 23, 2020
Merged

[RDBMS] Add flexible-server connect command#15419
Yong Zhang (yonzhan) merged 18 commits into
Azure:devfrom
mjain2:mjain2/flexConnect

Conversation

@mjain2

@mjain2 Mollee Jain (mjain2) commented Oct 6, 2020

Copy link
Copy Markdown
Contributor

Description
Adding flexible-server connect command. This allows customer to validate a connection to the database and optionally run a query against the database using the passed in username and password to connect. If database name is not provided the default db is used. Server name is pulled from local-context if applicable.

Testing Guide

  1. Create a PG and/or MySQL server with full firewall access to client IP
  2. Run the command below to connect:

az postgres flexible-server connect -n moljain-testserver -u mjuser -p Experiment123 -c "select * from pg_user;" --output table
az mysql flexible-server connect -n moljain-testserver2 -u mjuser -p Experiment123 -c "select host, user from mysql.user;" --output table

This checklist is used to make sure that common guidelines for a pull request are followed.

@yonzhan

Copy link
Copy Markdown
Collaborator

RDBMS

Comment thread src/azure-cli/azure/cli/command_modules/rdbms/_params.py
Comment thread src/azure-cli/azure/cli/command_modules/rdbms/flexible_server_custom_mysql.py Outdated
Comment thread src/azure-cli/azure/cli/command_modules/rdbms/flexible_server_custom_mysql.py Outdated
Comment thread src/azure-cli/azure/cli/command_modules/rdbms/flexible_server_custom_mysql.py Outdated
@mjain2

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Commenter does not have sufficient privileges for PR 15419 in repo Azure/azure-cli

Comment thread src/azure-cli/azure/cli/command_modules/rdbms/flexible_server_custom_mysql.py Outdated
@Juliehzl

Copy link
Copy Markdown
Contributor

Mollee Jain (@mjain2) please resolve conflicts

@Juliehzl Zunli Hu (Juliehzl) changed the title [RDBMS] Adding flexible-server connect command [RDBMS] Add flexible-server connect command Oct 22, 2020
@mjain2

Copy link
Copy Markdown
Contributor Author

Mollee Jain (@mjain2) please resolve conflicts

Sorry for delay, saw this message earlier. Merged and reran tests and checks to confirm everything looks ok.

@Juliehzl

Copy link
Copy Markdown
Contributor

Hi Feng Zhou (@fengzhou-msft) , could you help with package issue in darwin?

@mjain2

Copy link
Copy Markdown
Contributor Author

Zunli Hu (@Juliehzl) your latest commit seemed to have fixed the darwin error. The other error was for test-extensions which lost network connectivity, so retrying once more. Feng Zhou (@fengzhou-msft) for awareness.

@yonzhan
Yong Zhang (yonzhan) merged commit de6522b into Azure:dev Oct 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants