1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.2 Trouble after reinstalling mysql

Discussion in 'Installation, Upgrade, and Import Support' started by SniperBrob, Apr 26, 2014.

  1. SniperBrob

    SniperBrob Member

    So, to make a long story short, I moved around some mysql files and then reinstalled mysql. After that, my website says it has a database error, so I viewed the source. It says im missing a file, but I actually do have it. This is a screenshot of phpmyadmin http://puu.sh/8l4FC . You can see only 6 files, but on the left there is a bunch. What's going on here? My files arent corrupt.. are they?
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    I see this error:

    <!-- Mysqli prepare error: Table 'xenforo.xf_data_registry' doesn't exist -->

    Typically, if you have a mismatch between tables like that then yes, it suggests the backup is corrupt or incomplete.

    How did you move the database?
    The only way you should be doing it is via a backup and restore.
    You can't copy the actual files directly.

    In MySQL, when all tables were MyISAM, it was actually possible to copy the data files between servers; there were 3 per table: .MYI, .MYD, and .FRM.

    InnoDB is different. There are multi configurations for InnoDB, but neither allow direct copying anyway, mostly due to the transactional nature of it.

    If you have "file per table" enabled for InnoDB, there will be an .IBD file, but you still can't copy it manually.
     
  3. SniperBrob

    SniperBrob Member

    I just copied the actual files locally. I was told by a system administrator that it would be fine, but I guess not. I may have an old back up, but thats depressing if I have to revert back to that. What all is stored in mysql? Will my style changes and permissions be reverted as well, or just user / post / thread / ect data?
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    The database contains everything except attachments and avatars.
     
  5. SniperBrob

    SniperBrob Member

    Damn. So, in layman's terms, im ****ed?
     
  6. Brogan

    Brogan XenForo Moderator Staff Member

    You should always take a backup before doing any work of this nature on your site or server.
     
    Amaury likes this.
  7. SniperBrob

    SniperBrob Member

    The mysql partition was full so I couldnt make any backups, this was all on the spot. If I cant copy the mysql files directly, what do I use? Mysqldump? I thought that was only for cross-box
     
  8. Brogan

    Brogan XenForo Moderator Staff Member

    No, it's not just for cross-box.

    I use that to make a daily backup.

    Code:
    mysqldump -u<user> -p<password> --single-transaction --skip-lock-tables <db-name> > /path/to/backup/<db-name>_$(date +%d.%m.%y).sql
     
  9. MQK8

    MQK8 Active Member

    Hi Brogan,
    So when you say always do backups, do you mean going into my host cpanel and click the Backup Wizard >
    • Home Directory
    • MySQL Databases
    • Email forwarders configuration
    • Email filters configuration
    Click Backup ?

    Then when it's done it sends you a zip file to your email ? Then you download the zip file to your computer? Is this what you mean or is this not suffice? Still learning here.

    Thanks
     
    Last edited: Jul 8, 2014
  10. Brogan

    Brogan XenForo Moderator Staff Member

    I wouldn't recommend using cPanel for backups.
    People frequently complain they are corrupt or incomplete.
     
  11. MQK8

    MQK8 Active Member

    Hi Brogan:
    Is places like this worth using for backups or is it the same thing as a cpanel backup?
    http://m.codeguard.com
     
  12. Brogan

    Brogan XenForo Moderator Staff Member

    I couldn't comment.
    I have never heard of nor used them.
     
  13. MQK8

    MQK8 Active Member

    Hi Brogan
    I don't mean necessarily this particular company but would a third party like this that does hourly backups and if something goes south you're back up and running in a couple clicks?
    Thanks
     
  14. Brogan

    Brogan XenForo Moderator Staff Member

    I have no idea.
    I have never used a third party to do backups.
    You will need to ask them.
     

Share This Page