How to create a database in Plesk? (Video)

Creating a database in Plesk is straightforward and can be done using the Plesk control panel. Here's a step-by-step guide to help you create a MySQL or PostgreSQL database for your domain.

Step 1: Log in to Plesk

  1. Open your Plesk control panel by navigating to https://your-domain.com:8443 (replace your-domain.com with your actual domain or server IP address).
  2. Enter your admin username and password to log in.

Step 2: Navigate to the Database Management Section

  1. Once logged in, in the Plesk dashboard, go to the "Websites & Domains" tab (this is where you'll manage your domains and associated services).
  2. Under the domain for which you want to create a database, click on "Databases". This will open the Database Management page.

Step 3: Create a New Database

  1. On the Databases page, click the "Add Database" button.
  2. You will now be presented with the "Add Database" form.

Step 4: Configure Database Settings

  1. Enter the Database Name:
    • Provide a name for the database. For example, my_database.
  2. Select Database Type:
    • MySQL: This is the most commonly used database type for WordPress, Joomla, and other PHP-based applications.
    • PostgreSQL: Choose this if you're using a PostgreSQL database.
  3. Database User:
    • Create a Database User by entering a username and password. This user will have access to the database and should be assigned appropriate privileges.
      • Username: my_user
      • Password: your_secure_password
    • Ensure that the password is strong (e.g., containing letters, numbers, and special characters).
  4. Privileges:
    • By default, the database user will have all necessary privileges. You can customize the privileges based on the needs of your application (e.g., read, write, etc.).

Step 5: Add the Database

  1. After filling in all the fields, click the "OK" or "Apply" button to create the database.

Step 6: Verify the Database Creation

  1. After successfully creating the database, you should see the newly created database listed on the Databases page.
  2. You can click on the database name to view and manage it further.

Step 7: Access and Manage the Database (Optional)

  1. To manage the database, you can use phpMyAdmin (for MySQL databases) or PgAdmin (for PostgreSQL databases), which is integrated with Plesk.
  2. From the Databases page, click on phpMyAdmin next to your MySQL database (or the equivalent for PostgreSQL) to access the web interface for database management.
    • phpMyAdmin allows you to run SQL queries, import/export data, and manage tables.

Step 8: Use the Database in Your Application

  1. After creating the database, you'll need to configure your application (e.g., WordPress, Joomla, etc.) to connect to the database. The connection details (e.g., database name, username, password, and host) will be required in your application's configuration file (e.g., wp-config.php for WordPress).

Troubleshooting

  • Database Creation Fails: If you receive an error while creating a database, make sure that your Plesk user has sufficient privileges to create databases. Check with your server administrator or hosting provider if necessary.
  • Database Access Issues: If you're unable to access phpMyAdmin or PgAdmin, ensure that the proper software is installed on your server and that you have access to it.

By following these steps, you can easily create a database in Plesk and manage it via the built-in tools. Whether you're using MySQL for a WordPress site or PostgreSQL for a custom application, Plesk makes database creation and management user-friendly.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to delete a database in Plesk? (Video)

To delete a database in Plesk. Be aware that deleting a database will permanently remove all...

How to generate a dump of the database and download it in Plesk? (Video)

To generate a dump (backup) of your database and download it in Plesk. This process is...

How to create a database username in Plesk? (Video)

Creating a database username in Plesk is a straightforward process. The database...

How to remove a database username in Plesk? (Video)

  To remove a database username in Plesk, you need to delete the user...