How to Create a New MySQL/MariaDB Database

1 min read

Databases are essential for dynamic websites and applications. Plesk makes it simple to create and manage MySQL or MariaDB databases for your projects. Follow these steps to create a new database.

Step 1: Log in to Plesk #

  1. Open your web browser and go to the Plesk login page.
  2. Enter your credentials and click Log in.

 

 

Step 2: Navigate to the Databases Section #

  1. In the Plesk dashboard, go to the Websites & Domains section.
  2. Select the domain where you want to create the database.
  3. Click on Databases to open the database management interface.

 

 

Step 3: Create a New Database #

  1. In the Databases section, click Add Database.
  2. Fill in the required details:
    • Database Name: Enter a unique name for the database (e.g., my_website_db).
    • Related Site: Choose the website the database is associated with (if applicable).
    • Database Server: Select MySQL or MariaDB from the dropdown (default is usually MariaDB).
  3. Click OK to create the database.

 

 

Step 4: Create a Database User #

  1. In the same form, scroll to the Users section.
  2. Add a new user by entering:
    • Username: Choose a username for the database (e.g., db_user).
    • Password: Set a strong password or click Generate for a secure password.
  3. Assign the user full permissions to the database unless you need to restrict access for security purposes.
  4. Click OK to save the user.

Step 5: Verify the Database #

  1. Return to the Databases section in Plesk.
  2. Confirm that the newly created database and user are listed.
  3. Optionally, click Webadmin to open phpMyAdmin and view the database.

 

 

Tips #

  • Use descriptive names for databases to easily identify them in the future.
  • Secure database users with strong, unique passwords.
  • Use phpMyAdmin (accessible via Plesk) to manage and populate your database.
Updated on December 30, 2024

What are your feelings

  • Happy
  • Normal
  • Sad