• Resolved kengr

    (@kengr)


    My web host has had a multi-week catastrophic outage, and although my server is up and running again, I’m now left with the files from my WordPress site, and the database structure, but all tables are completely empty. I was able to find the database backups in the aiowps_backups folder, chose the latest available backup, and downloaded and unzipped it to my local drive.

    On the host (in Plesk), I then went to phpAdmin for the database, selected the database on the left, went to the Structure tab (which shows that the database is completely empty), went to the Import tab, selected the SQL file I had downloaded and unzipped (the file has a .SQL extension), and started the import operation. Almost immediately, I got the following error:

    ———————————
    Error
    SQL query:

    CREATE TABLE ewy7w_aiowps_events (
    id bigint(20) NOT NULL AUTO_INCREMENT,
    event_type varchar(150) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT ”,
    username varchar(150) COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,
    user_id bigint(20) DEFAULT NULL,
    event_date datetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
    ip_or_host varchar(100) COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,
    referer_info varchar(255) COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,
    url varchar(255) COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,
    country_code varchar(50) COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,
    event_data longtext COLLATE utf8mb4_unicode_520_ci,
    PRIMARY KEY (id)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci
    MySQL said: Documentation

    #1813 – Tablespace for table ‘bytellec_wordpress_1.ewy7w_aiowps_events‘ exists. Please DISCARD the tablespace before IMPORT.
    ———————————

    Note that no ewy7W_aiowps_events table appears in the structure shown in the left pane of phpAdmin, either before or after the attempted import operation. But ewy7w_aiowps_global_meta, ewy7w_aiowps_login_activity, ewy7w_aiowps_login_lockdown, and ewy7w_aiowps_permanent_block do appear in the list of tables on the left. Of course, all of these tables are empty.

    If it helps, this is a Windows hosting plan.

    I’m not a MySQL person, and I’ve visited the FAQ and done some searches about this, and I’m not quite sure what to do to get past this error. I didn’t see a way to “drop” anything in the Structure tab, because it reports “no tables found in database”. (I would ask the web hosting service for help, but they’re still scrambling to recover other servers, and are very unresponsive to any trouble tickets for the time being.)

    Any recommendations on how to overcome this 1813 error and get my database file imported? Do I need to just create a brand new database, import the SQL file to that, and then point everything to that new database? I’ve never done that before (always relied on WordPress to set it all up), but I am willing to try if that’s what’s required.

    Thanks for your time and consideration.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter kengr

    (@kengr)

    By the way, based on my notes, it appears that I had All In One WP Security 4.3.8.3 installed at the time the database backups were created. But I’m not 100% sure that there wasn’t a plugin update somewhere in there, so this version is as close an approximation as I can come up with right now.

    Thread Starter kengr

    (@kengr)

    I ended up creating a brand new MySQL database, importing the SQL backup file into that database, editing the wp-config.php file to point to the new database, and I’m back in business.

    I would still be interested in knowing why I was getting the reported error when attempting to restore to the existing database that had structure but no tables.

    Plugin Contributor wpsolutions

    (@wpsolutions)

    Hi @kengr,
    Good to hear you’re back up and running.
    Regarding your issue – I’m not sure why you were seeing such an issue but it appears that you had some kind of corruption with your DB.

    The following accepted answer in stackoverflow might provide more insights for you:
    https://stackoverflow.com/questions/17914446/mysqldump-problems-with-restore-error-please-discard-the-tablespace-before-imp

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Help with MySQL error 1813 attempting to restore database from backup’ is closed to new replies.