Home Forums Tech Web Development MySQL – How to restore selected records?

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #2418
    DanutaStavishw
    Spectator

    LOAD DATA LOCAL INFILE 'X:\\T\\wp_users.csv'
    INTO TABLE wp_users
    COLUMNS TERMINATED BY ',' ENCLOSED BY '"'
    LINES TERMINATED BY '\r\n';

    LOAD DATA LOCAL INFILE 'X:\\T\\wp_usermeta.csv'
    INTO TABLE wp_usermeta
    COLUMNS TERMINATED BY ',' ENCLOSED BY '"'
    LINES TERMINATED BY '\r\n';

    Please note that you can even restore key fields, that are set to auto-increase, as long as you to do not attempt to create a duplicate records.  This simple method allowed me to restore a delete user, and later a was able to link her articles back to the original user.  Major PR disaster averted!

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.