Create the Artifactory PostgreSQL Database
Use the commands below to create an Artifactory user and database with the appropriate permissions. Modify relevant values to match your specific environment.
Use the commands below to create an Artifactory user and database with appropriate permissions. Modify the relevant values to match your specific environment.
Create an Artifactory User and Database as a superuser
CREATE USER artifactory WITH PASSWORD 'password';
CREATE DATABASE artifactory WITH OWNER=artifactory ENCODING='UTF8';
GRANT ALL PRIVILEGES ON DATABASE artifactory TO artifactory;Create an Artifactory user and database with a restricted superuser (such as rds_superuser used by AWS RDS)
CREATE USER artifactory WITH PASSWORD 'password';
ALTER ROLE artifactory WITH CREATEDB;
## Connect with the new user
\c <current-database> artifactory
## Create a new database and grant full privileges
CREATE DATABASE artifactory WITH OWNER=artifactory ENCODING='UTF8';
GRANT ALL PRIVILEGES ON DATABASE artifactory TO artifactory;Verify that the script is correct for your environment, and run it to create the database.
Artifactory Privileges
You must give Artifactory full privileges on the database.
Updated 5 days ago
