We run a Plesk server, for our sins. We yesterday did an update from MariaDB 10.5.17 to 10.11.14
SYSTEM:
- AlmaLinux 9.6
- Plesk Obisidan 18.0.73
An issue that has been identified with this is that there are a bunch of "phantom" tables, that can't be replaced yet don't appear to any of the users on the system.
NOTE:
I am aware that Plesk uses "admin" as the core SQL user rather than "root". I have tried without success to find/reset the root password on the MariaDB, but this doesn't appear to have worked (will maybe retry another approach in just a sec).
While the stems here are for a specific table / DB, the wider issues effects all DBs on the server to some extent or another, including the Plesk PSA.
1 :
Website PHP/MySQL interaction states:
Error: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'someone_pictures.gallerynames' doesn't exist
However, the IDE before refresh shows:
After refresh the IDE shows:
2 :
Further, logging in to the MySQL using the CLI:
MariaDB [someone_pictures]> SHOW TABLES; +-----------------------------+ | Tables_in_someone_pictures | +-----------------------------+ | counter | | newgallery | | news | +-----------------------------+
I also checked the user's privileges and they're all fine:
MariaDB [mysql]> SHOW GRANTS FOR 'someone_theUser'@'localhost'; +-----------------------------------------------------------------------------------------------------------------------------------------+ | Grants for someone_theUser@localhost | +-----------------------------------------------------------------------------------------------------------------------------------------+ | GRANT USAGE ON *.* TO `someone_theUser`@`localhost` IDENTIFIED BY PASSWORD '::::::' | | GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER ON `someone_pictures`.* TO `someone_theUser`@`localhost`
3 :
So this table doesn't seem to exist, I therefore create it from a dump (from yesterday, before the update). The command is run in the correct Database:
MariaDB [someone_pictures]> CREATE TABLE `gallerynames` ( -> `ID` mediumint(6) NOT NULL AUTO_INCREMENT, -> `dirnum` varchar(20) DEFAULT NULL, -> `gname` varchar(255) DEFAULT NULL, -> `gsummary` varchar(255) DEFAULT NULL, -> `gshow` varchar(4) NOT NULL DEFAULT 'HIDE', -> `content` mediumtext DEFAULT NULL, -> `listing` int(8) DEFAULT NULL COMMENT 'even numbers.', -> PRIMARY KEY (`ID`), -> UNIQUE KEY `dirnum_2` (`dirnum`), -> KEY `listing` (`listing`) -> ) ENGINE=InnoDB AUTO_INCREMENT=786 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='names of the galleries';
But this returns:
ERROR 1005 (HY000): Can't create table
someone_pictures.gallerynames(errno: 184 "Tablespace already exists")
So the table space already exists?
I had originally re-imported a 1Gb backup of the entire server SQL and that seemed to have worked ok mostly, the backup was auto-created by the Plesk update system prior to updating from 10.5.17 to 10.11.14 . Some of these tables seem to be "phantom".
I have tried "Discard Tablespace" But this fails to do anything, seems to be possibly a limiter on the Plesk "admin" user maybe?
I have also tried to clear all the files from the
/var/lib/mysql/directory to "clear" the MariaDB and then re-instantiate the files from an SQL backup- This seems to have worked in as far as the Database content is there, but the "phantom" tablespaces still remain.
Help please:
I see the issue as two fold:
Can the "root" user "see" Tablespace and edit it directly? (eg is it worth logging in as "root" rather than as Plesk "admin"?
If not, this How DISCARD the tablespace on mariadb while table is not found? Q&A references deleting the tablespace data...
BUT, we have already deleted the /var/lib/mysql/ib_logfile0 and /var/lib/mysql/ib_logfile1 as well as the /var/lib/mysql/ibdata1 files and this hasn't resolved the issue.
Is this a good idea:
My plan is now, something like this:
- wipe the files from
/var/lib/mysql/entirely. - Stop MariaDB
- Reinstall MariaDB 10.11.14 from the command line. See How to reset MariaDB into a "fresh install" state?
- Set the Root login and password and record this outside and well away from Plesk "Admin" user.
- Log in directly to MariaDB CLI (not using
Plesk db) - Reinstate the SQL dump we have from before the update.
Is this a good idea? I don't know enough to know if I'm digging further down this hole or actually digging up and out this hole.

