• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

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