The PostgreSQL Database Wizard in cPanel is a step-by-step tool that helps you create a PostgreSQL database, set up user accounts, and assign privileges all in one streamlined process. This wizard is ideal for creating your first database and user, while additional databases or users can be added through the PostgreSQL Databases interface in cPanel.
What Is the PostgreSQL Database Wizard?
The PostgreSQL Database Wizard simplifies database setup by guiding you through each step in a logical sequence. Instead of manually creating databases and users separately, the wizard combines these tasks into a single workflow, automatically granting the new user access to the new database. This approach reduces setup time and minimizes configuration errors, making it perfect for users who are new to PostgreSQL or cPanel.
How to Create a PostgreSQL Database Using the Wizard
Follow these steps to set up a complete PostgreSQL database with a user account:
- Access the wizard: Log into your cPanel account and navigate to Databases, then select PostgreSQL Database Wizard.
- Create the database: In the New Database field, enter a name for your database and click Create Database. Keep in mind that database names have a maximum length of 63 characters, including any prefix your hosting provider requires.
- Create a user: Enter a username in the Username field. This will be the account that manages your database.
- Set a password: Enter and confirm a strong password. The system displays a password strength meter that rates your password from 0 (weak) to 100 (very secure). OBHost recommends using a password strength of at least 70 for optimal security.
- Generate a strong password (optional): If you need help creating a secure password, click the Password Generator option to automatically create one.
- Create the user: Click Create User to proceed.
- Confirm and submit: Review the user and database names displayed, then click Submit to complete the setup.
After submission, the system confirms that your database and user account have been created successfully. The wizard automatically grants the new user all necessary privileges to manage the database.
Important Naming Considerations
When creating databases and usernames, keep these guidelines in mind:
- Maximum length is 63 characters total
- If database prefixing is enabled by your hosting provider, the prefix and underscore character count toward this limit
- Choose descriptive names that help you identify the purpose of each database
- Use only alphanumeric characters and underscores
What Happens After Database Creation
Once your database is set up, the wizard presents three options:
- Add another database: Returns you to the beginning of the wizard to create additional databases with new users
- Add another PostgreSQL Database User: Opens the PostgreSQL Databases interface where you can create additional users and assign them to existing databases
- Return to Home: Takes you back to the main cPanel dashboard
Since the wizard automatically assigns the user to the database with full privileges, you do not need to manually add the user through the PostgreSQL Databases interface.
When to Use the Wizard vs. PostgreSQL Databases Interface
The PostgreSQL Database Wizard is best suited for:
- Creating your first database and user account
- Setting up a complete database environment in one process
- Users who prefer guided, step-by-step instructions
The PostgreSQL Databases interface (found at cPanel Home, Databases, PostgreSQL Databases) is better for:
- Creating multiple databases without new users
- Adding users to existing databases
- Managing database privileges for existing users
- Performing advanced database management tasks
PostgreSQL Database Security Best Practices
To keep your PostgreSQL databases secure, follow these recommendations:
- Always use strong, unique passwords with a strength rating above 70
- Create separate database users for different applications rather than sharing one user across multiple databases
- Regularly update passwords for database users
- Grant only the minimum privileges necessary for each user
- Keep track of which users have access to which databases
Frequently Asked Questions
What is the maximum length for PostgreSQL database names in cPanel?
PostgreSQL database names and usernames can be up to 63 characters long. If your hosting provider has enabled database prefixing, this limit includes the prefix and the underscore character. For example, if your prefix is "user123_", you have 55 characters remaining for your chosen database name.
Can I use the PostgreSQL Database Wizard to add users to existing databases?
No, the PostgreSQL Database Wizard is designed to create new databases and new users simultaneously. To add a user to an existing database, you need to use the PostgreSQL Databases interface in cPanel, where you can access the Add User to Database section.
Does the wizard automatically grant database privileges to the new user?
Yes, when you create a database and user through the PostgreSQL Database Wizard, the system automatically grants the user full privileges to manage that database. You do not need to manually assign privileges or add the user to the database through any other interface.
How do I create additional databases after using the wizard?
After completing the wizard, you can click "Add another database" to run through the wizard again, or you can use the PostgreSQL Databases interface in cPanel for more direct control over database and user creation. Both methods are effective, though the wizard provides more guidance for new users.
If you need assistance with PostgreSQL database setup or encounter any issues while using the Database Wizard, OBHost's support team is available 24/7 to help. Visit our contact page or email support@obhost.org for technical support.