• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Please beaware of a breaking change in the REST API on the next Plesk release (18.0.62).
    Starting from Plesk Obsidian 18.0.62, requests to REST API containing the Content-Type header with a media-type directive other than “application/json” will result in the HTTP “415 Unsupported Media Type” client error response code. Read more here

Can not delete a database from plesk - 504 Gateway Time-out

MickaelM

New Pleskian
Hello,

I had to import a base data (70MB), I created the database on plesk, and I imported by ssh. It seems to create problems rights on this database because the script (prestashop) could not seem to write to the database. So I tried to change the owner of the database as I usually do for files. But it did not work, I changed again to reset to "mysql" owner like the other database, but since it is impossible to remove the database from Plesk. I get an error 504 Gateway Time-out.

So I deleted the database with shh as if I delete a folder in /var/lib/mysql
I think it was a mistake, because the database still appears in plesk. And I still can not remove it from Plesk.

How to completely remove the database so that it no longer appear in plesk? And it no longer exists ?

I have a backup, but when I apply the dbase is still in the list.

Thank's for your help,

Michael
 
Michael,

It is probably a Plesk database issue, with this database still registering information about the imported Database (that you deleted afterwards).

A simple solution should be "undeleting" the database (just put the database back in the directory, from which you deleted it) and remove the Database from Plesk Control Panel.

Note: do NOT change the owner of the Database, since that is part of the problem you created for yourself (hence: keep the original owner when "undeleting" it)

If that does not work (it often should), you should be manually removing all entries (regarding the Database) in the central Plesk database, by preference using command line in ssh.

The latter solution is not that simple, so first try the before mentioned "simple" solution.
 
Thank's for your reply Trialotto,

Unfortunately, it seems that I can not recover the database as it was before. I have a backup, but apparently a little older than I thought.

I tried to create a folder with the name of the database in ssh, to remove it from plesk, but it is not working. I get 504 Gateway Time-out (nginx)

I see another problem, it also affects all databases hosted on the server. With another user, I just tried to copy another database from plesk and I have the same error.
 
Mikael,

Please give some additional information about the steps taken, in order to have that errors popping up.

By the way, did you have a proper working set-up before?

If so, do you have any (proper) backups?
 
To give more information, I have ​​a proper backup made with Plesk. But the database is still not deleted when I tried to restore a backup in which the database relevant does not exist yet. It really looks like a rights issue, yet I check the rights with ssh. I put exactly the same rights as other database.(drwx) .

All steps:
I wanted to import a database by ssh
Creating the database on plesk
import by ssh
Prestashop could not write to the database so I tried to change the owner of the database by the plesk user owner ( mysql to mypleskuser).
unsuccessful, Attempt to delete from plesk failed.
Deletion by ssh (rm-rf dbname)
deleted folder database but still there in plesk.
Attempt to delete from pesk failed.
Attempt to recreate the database ( mkdir dbname)
import the database via ssh - ok
Attempt to delete from plesk failed.
change the owner (chown -c mysql dbaname)
Attempt to delete from plesk failed.
Checking chmod rights. Adding the same rights as the databases created by plesk. (drwx)
Attempt to delete from plesk failed.

from phpmyadmin, the base was available. tables avaiable
Creating a user with all the rights and privileges
attempt to delete database from phpmyadmin failed.

Try to connect in plesk with root login and not admin.. Same results.

out of ideas. Complete reinstallation of the system :)
* So issue is partially solved.

Thank's for your help trialotto
 
Mickael,

A reinstallation of the system?

Ehm, not necessary, really not necessary.

In essence, you are talking about a database, as if it is a normal file.

That is (very) wrong, it is not a surprise that you have encountered some problems.

I - Deletion in Plesk will not be succesful if you keep messing with owners, groups and rights (should be mysql:mysql)

II - Creation of a dbase has to be accompanied with the creation of a dbase user (the dbase is only accessible when a dbase user exists; Prestashop can only write to the database, if username and passwords are correct)

III - Prestashop installations can have some rights issues (that is, rights issues concering files installed with Prestashop, not the dbases)

It is very likely that you just should try to identify the primary cause of the (various unrelated) problem(s), before reinstalling the full system.

Kind regards
 
Last edited:
Back
Top