Plesk

Unable to create a database in Plesk: A database with the name example_db already exists

Symptoms

Cause

The database already exists in MySQL:

# plesk db -ne"show databases" | grep db_example
db_example

Resolution

 

Remove the existing database from MySQL/MariaDB

 

If the database is not needed, remove it from MySQL/MariaDB:

  1. Connect to the Plesk server via SSH.

  2. Just in case, create a database dump:

    # plesk db dump db_example > db_example.sql

  3. Connect to MySQL/MariaDB server:

    # plesk db

  4. Drop the existing database:

    MariaDB> DROP DATABASE db_example;

 

Register the existing database in Plesk

 

Register the existing database in Plesk using the instructions from this KB article.

 

Exit mobile version