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 #
- Open your web browser and go to the Plesk login page.
- Enter your credentials and click Log in.
Step 2: Navigate to the Databases Section #
- In the Plesk dashboard, go to the Websites & Domains section.
- Select the domain where you want to create the database.
- Click on Databases to open the database management interface.
Step 3: Create a New Database #
- In the Databases section, click Add Database.
- 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).
- Database Name: Enter a unique name for the database (e.g.,
- Click OK to create the database.
Step 4: Create a Database User #
- In the same form, scroll to the Users section.
- 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.
- Username: Choose a username for the database (e.g.,
- Assign the user full permissions to the database unless you need to restrict access for security purposes.
- Click OK to save the user.
Step 5: Verify the Database #
- Return to the Databases section in Plesk.
- Confirm that the newly created database and user are listed.
- 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.