• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved unable to create exp_event

sebgonzes

Silver Pleskian
Hello

We had an issue with our mysql database server last week and have had to restore plesk database with automatical dumps.
All gone fine exept exp_event table that give us en mysql error restore, and we are unable to restore it
It's not an essencial table, so all work fine, but we would have an optimal plesk situation and this table had to work, how I can create is again?


CREATE TABLE `exp_event` (
`event_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`id` bigint(10) unsigned NOT NULL AUTO_INCREMENT,
`source` enum('pa','plesk') DEFAULT NULL,
`event_type` enum('started','stopped','created','updated','deleted','status_changed','terminated','flushed','installed','uninstalled','siteapp_added','siteapp_removed','expired','exceeded','guid_changed') NOT NULL DEFAULT 'started',
`obj_class` varchar(255) NOT NULL DEFAULT 'license',
`obj_id` varchar(255) NOT NULL,
`host` varchar(255) NOT NULL,
`user` varchar(255) NOT NULL,
`flushed` enum('true','false') NOT NULL DEFAULT 'false',
PRIMARY KEY (`id`),
KEY `source` (`source`,`event_type`),
KEY `flushed` (`flushed`),
KEY `source_2` (`source`,`event_type`,`obj_class`),
KEY `source_3` (`source`,`event_time`,`event_type`,`obj_class`)
) ENGINE=InnoDB AUTO_INCREMENT=3295241 DEFAULT CHARSET=utf8;


ERROR 1005 (HY000): Can't create table `psa`.`exp_event` (errno: 168 "Unknown (generic) error from engine") mariadb is 10.1.48.
 
Recreated table without any problem:

Code:
MariaDB [psa]> show create table exp_event\G
*************************** 1. row ***************************
       Table: exp_event
Create Table: CREATE TABLE `exp_event` (
  `event_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `id` bigint(10) unsigned NOT NULL AUTO_INCREMENT,
  `source` enum('pa','plesk') DEFAULT NULL,
  `event_type` enum('started','stopped','created','updated','deleted','status_changed','terminated','flushed','installed','uninstalled','siteapp_added','siteapp_removed','expired','exceeded','guid_changed') NOT NULL DEFAULT 'started',
  `obj_class` varchar(255) NOT NULL DEFAULT 'license',
  `obj_id` varchar(255) NOT NULL,
  `host` varchar(255) NOT NULL,
  `user` varchar(255) NOT NULL,
  `flushed` enum('true','false') NOT NULL DEFAULT 'false',
  PRIMARY KEY (`id`),
  KEY `source` (`source`,`event_type`),
  KEY `flushed` (`flushed`),
  KEY `source_2` (`source`,`event_type`,`obj_class`),
  KEY `source_3` (`source`,`event_time`,`event_type`,`obj_class`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8
1 row in set (0.00 sec)

MariaDB [psa]> drop table exp_event;
Query OK, 0 rows affected (0.10 sec)

MariaDB [psa]> CREATE TABLE `exp_event` (
    ->   `event_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
    ->   `id` bigint(10) unsigned NOT NULL AUTO_INCREMENT,
    ->   `source` enum('pa','plesk') DEFAULT NULL,
    ->   `event_type` enum('started','stopped','created','updated','deleted','status_changed','terminated','flushed','installed','uninstalled','siteapp_added','siteapp_removed','expired','exceeded','guid_changed') NOT NULL DEFAULT 'started',
    ->   `obj_class` varchar(255) NOT NULL DEFAULT 'license',
    ->   `obj_id` varchar(255) NOT NULL,
    ->   `host` varchar(255) NOT NULL,
    ->   `user` varchar(255) NOT NULL,
    ->   `flushed` enum('true','false') NOT NULL DEFAULT 'false',
    ->   PRIMARY KEY (`id`),
    ->   KEY `source` (`source`,`event_type`),
    ->   KEY `flushed` (`flushed`),
    ->   KEY `source_2` (`source`,`event_type`,`obj_class`),
    ->   KEY `source_3` (`source`,`event_time`,`event_type`,`obj_class`)
    -> ) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8;
Query OK, 0 rows affected (0.06 sec)

MariaDB [psa]> select * from exp_event;
Empty set (0.01 sec)

Code:
# mysql --version
mysql  Ver 15.1 Distrib 5.5.64-MariaDB, for Linux (x86_64) using readline 5.1
 
Recreated table without any problem:

Code:
MariaDB [psa]> show create table exp_event\G
*************************** 1. row ***************************
       Table: exp_event
Create Table: CREATE TABLE `exp_event` (
  `event_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `id` bigint(10) unsigned NOT NULL AUTO_INCREMENT,
  `source` enum('pa','plesk') DEFAULT NULL,
  `event_type` enum('started','stopped','created','updated','deleted','status_changed','terminated','flushed','installed','uninstalled','siteapp_added','siteapp_removed','expired','exceeded','guid_changed') NOT NULL DEFAULT 'started',
  `obj_class` varchar(255) NOT NULL DEFAULT 'license',
  `obj_id` varchar(255) NOT NULL,
  `host` varchar(255) NOT NULL,
  `user` varchar(255) NOT NULL,
  `flushed` enum('true','false') NOT NULL DEFAULT 'false',
  PRIMARY KEY (`id`),
  KEY `source` (`source`,`event_type`),
  KEY `flushed` (`flushed`),
  KEY `source_2` (`source`,`event_type`,`obj_class`),
  KEY `source_3` (`source`,`event_time`,`event_type`,`obj_class`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8
1 row in set (0.00 sec)

MariaDB [psa]> drop table exp_event;
Query OK, 0 rows affected (0.10 sec)

MariaDB [psa]> CREATE TABLE `exp_event` (
    ->   `event_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
    ->   `id` bigint(10) unsigned NOT NULL AUTO_INCREMENT,
    ->   `source` enum('pa','plesk') DEFAULT NULL,
    ->   `event_type` enum('started','stopped','created','updated','deleted','status_changed','terminated','flushed','installed','uninstalled','siteapp_added','siteapp_removed','expired','exceeded','guid_changed') NOT NULL DEFAULT 'started',
    ->   `obj_class` varchar(255) NOT NULL DEFAULT 'license',
    ->   `obj_id` varchar(255) NOT NULL,
    ->   `host` varchar(255) NOT NULL,
    ->   `user` varchar(255) NOT NULL,
    ->   `flushed` enum('true','false') NOT NULL DEFAULT 'false',
    ->   PRIMARY KEY (`id`),
    ->   KEY `source` (`source`,`event_type`),
    ->   KEY `flushed` (`flushed`),
    ->   KEY `source_2` (`source`,`event_type`,`obj_class`),
    ->   KEY `source_3` (`source`,`event_time`,`event_type`,`obj_class`)
    -> ) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8;
Query OK, 0 rows affected (0.06 sec)

MariaDB [psa]> select * from exp_event;
Empty set (0.01 sec)

Code:
# mysql --version
mysql  Ver 15.1 Distrib 5.5.64-MariaDB, for Linux (x86_64) using readline 5.1
Hello, our version is a quite superior (10.2)
 
@IgorG Problem have been solved finally.

inicialy, no exp_event.frm are present in psa directory database, but logical error


MariaDB [psa]> DROP TABLE exp_event;
ERROR 1051 (42S02): Unknown table 'psa.exp_event'

MariaDB [psa]> CREATE TABLE `exp_event2` ( `event_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `id` bigint(10) unsigned NOT NULL AUTO_INCREMENT, `source` enum('pa','plesk') DEFAULT NULL, `event_type` enum('started','stopped','created','updated','deleted','status_changed','terminated','flushed','installed','uninstalled','siteapp_added','siteapp_removed','expired','exceeded','guid_changed') NOT NULL DEFAULT 'started', `obj_class` varchar(255) NOT NULL DEFAULT 'license', `obj_id` varchar(255) NOT NULL, `host` varchar(255) NOT NULL, `user` varchar(255) NOT NULL, `flushed` enum('true','false') NOT NULL DEFAULT 'false', PRIMARY KEY (`id`), KEY `source` (`source`,`event_type`), KEY `flushed` (`flushed`), KEY `source_2` (`source`,`event_type`,`obj_class`), KEY `source_3` (`source`,`event_time`,`event_type`,`obj_class`) ) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8;
Query OK, 0 rows affected (0.01 sec)



MariaDB [psa]> RENAME TABLE exp_event2 TO exp_event;
ERROR 1050 (42S01): Table './psa/exp_event' already exists

MariaDB [psa]> drop table exp_event2;
Query OK, 0 rows affected (0.01 sec)

Finally, I copy file from another server, so then :

plesk db
MariaDB [psa]> select * from exp_event;
ERROR 1030 (HY000): Got error 194 "Tablespace is missing for a table" from storage engine InnoDB


MariaDB [psa]> drop table exp_event;
Query OK, 0 rows affected (0.01 sec)


MariaDB [psa]> CREATE TABLE `exp_event` ( `event_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `id` bigint(10) unsigned NOT NULL AUTO_INCREMENT, `source` enum('pa','plesk') DEFAULT NULL, `event_type` enum('started','stopped','created','updated','deleted','status_changed','terminated','flushed','installed','uninstalled','siteapp_added','siteapp_removed','expired','exceeded','guid_changed') NOT NULL DEFAULT 'started', `obj_class` varchar(255) NOT NULL DEFAULT 'license', `obj_id` varchar(255) NOT NULL, `host` varchar(255) NOT NULL, `user` varchar(255) NOT NULL, `flushed` enum('true','false') NOT NULL DEFAULT 'false', PRIMARY KEY (`id`), KEY `source` (`source`,`event_type`), KEY `flushed` (`flushed`), KEY `source_2` (`source`,`event_type`,`obj_class`), KEY `source_3` (`source`,`event_time`,`event_type`,`obj_class`) ) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8;
Query OK, 0 rows affected (0.01 sec)

This is our solution in our case, sometime not the better, but seem working.
 
Back
Top