Trying to restore MyISAM to InnoDB

UpdraftPlus Home Forums Paid support forum – UpdraftPlus backup plugin Trying to restore MyISAM to InnoDB

  • This topic has 6 replies, 3 voices, and was last updated 6 years ago by Jacob.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #272947
    Jacob
    Participant

    I’m migrating from an old server to new.
    Old server is using MyISAM, and new is using InnoDB database.
    I’m also adding in SSL during the migration.

    I’m assuming this database change is the issue?

    Processing table (MyISAM): wp_options
    An error (1) occurred: – Storage engine MyISAM is disabled (Table creation is disallowed). – the database query being run was: CREATE TABLE wp_options ( option_id bigint(20) unsigned NOT NULL AUTO_INCREMENT, option_name
    Disabling Maintenance mode…
    Error message: An error occurred on the first CREATE TABLE command – aborting run
    Restore failed…

    #272961
    Bryle Crodua
    Moderator

    Hi Jacob,

    As the log shows, it appears that “Storage engine MyISAM is disabled”. Please ask your host/server admin if that is the case. If so, then ask them if they can enable it for you.

    Kind Regards,
    Bryle

    #272979
    udadmin
    Keymaster

    N.B. In modern MySQL versions, it’s not possible to disable the MyISAM engine. So, your new server must be running a pretty old version – it might be worth asking the admin to upgrade it to something modern.

    #272987
    Jacob
    Participant

    In theory- this should be super modern.
    I’m attempting to self-host on a Google Cloud instance. So *I* am the host/admin. I’ll ask around, but this server is only days old.

    #272989
    Jacob
    Participant

    https://cloud.google.com/sql/faq

    For MySQL Second Generation instances, InnoDB is the only storage engine supported. For MySQL First Generation instances, the InnoDB storage engine is recommended, because it provides stronger data consistency guarantees.
    If you have a mysqldump file where all your tables are in MyISAM format, you can convert them to InnoDB format by piping the file through a sed script:

    mysqldump –databases [DATABASE_NAME] \
    -h [INSTANCE_IP] -u [USERNAME] -p [PASSWORD] \
    –hex-blob –default-character-set=utf8 | sed ‘s/ENGINE=MyISAM/ENGINE=InnoDB/g’ > [DATABASE_FILE].sql
    Warning: You should not do this if your mysqldump file contains the mysql schema. Those files must remain in MyISAM.

    I am using 2nd Gen, and I am interested in the data consistency.
    Is there a way I can use this script as part of my work flow using UpDraft to migrate my site?

    #273019
    Jacob
    Participant

    Now I’m questioning the modernness of my SQL database… @udadmin?

    #273144
    Jacob
    Participant

    Guys-
    I’m a weekend warrior. I know enough to get in trouble.
    But I’m frustrated that this isn’t getting more attention. I’m frustrated that it was recommended to me to “go ask my server to give me something more modern” (which would have made me look like a complete jackass)– when all evidence is that my server is SO modern, you’ve never heard of MySQL Gen2, where myISAM isn’t an option. Cool.

    I figured it out myself- but I’m frustrated that no more suggestions were made or options presented.

    My solution (so other people who run into this can actually get some possible help) was to upgrade my database to InnoDB on my old server first- which can be done in myPHPAdmin. You can either do it one table at a time via the GUI- or with a few lines of SQL code, and some copy and pasting.

    If you don’t know what you’re doing- I recommend the GUI way. Click the table, go to the operations tab, and change the engine from myISAM to InnoDB. Repeat for each table (apologies if you have a lot)

    In the future- please don’t suggest that people go ask their server for “something more modern” without having all the facts. That’s just so rude.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Trying to restore MyISAM to InnoDB’ is closed to new replies.