fbpx

Create PostgreSQL from Azure CLI

To create a PostgreSQL database in Azure using the Azure CLI, you will need to have the Azure CLI installed on your computer and be logged in to your Azure account.

To create a PostgreSQL database, you can use the az postgres server create command, which has the following syntax:

				
					az postgres server create --name <server_name> --resource-group <resource_group_name> --location <location> --admin-user <admin_username> --admin-password <admin_password>

				
			

Here’s an example of how you could use this command to create a PostgreSQL database called my_database in the eastus region:

				
					az postgres server create --name my_database --resource-group my_resource_group --location eastus --admin-user my_username --admin-password my_password

				
			

This command will create a new PostgreSQL server and database, and assign the specified admin username and password. You can then use these credentials to connect to the database using any PostgreSQL client, such as Azure Data Studio or the psql command-line interface.

Share:

Facebook
Twitter
Pinterest
LinkedIn

Social Media

Most Popular

Get The Latest Updates

Subscribe To Our Weekly Newsletter

No spam, notifications only about new products, updates.

Categories