Articles in this section

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

Plesk for Linux kb: technical

Applicable to:

  • Plesk for Linux

Symptoms

  • When creating a database in Plesk at Domains > example.com > Databases, the operation fails with the error message:

    PLESK_ERROR: A database with the name db_example already exists.

  • The database is not listed in Plesk at Tools & Settings > Database Servers > MySQL/MariaDB (under databases).

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:

    MYSQL_LIN: MariaDB> DROP DATABASE db_example;

 

Register the existing database in Plesk

 

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

 

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.