XF 1.4 SQL problems

rwsender

Member
I recently had a problem where my dedicated server got a virus, I had no option but to reinstall the OS. I went to the SQL libary, downloaded all of the files, then all of the files in my html directory. The sql files for my other programes haven't been affected. If you go the website, and inspect the element, thats what it shows.



Code:
  <body>

  An unexpected database error occurred. Please try …

  <!--
[B]
  Mysqli prepare error: Table 'supercra_forums.xf_d…[/B]

  -->
  </body>

</html>

[/]





http://supercraft-mc.com/
 
The actual error is this:

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

That table is missing from the database for some reason.
Contact your host and ask them to investigate who has had access to be able to delete it but you will more than likely need to restore from a backup.
 
If you copied the actual files for the database, thats not good. Unless of course the sql server process had a graceful shut down. I am no expert but a hot copy or a bad copy is going to need to go through a repair before being used. Disregard if you did a dump properly from a working server, then I have no clue.
 
It shouldnt of been a hot copy, I couldn't properly move the mysql because my server had gotten a virus,I was unable to start any processes, I only had ftp access. I'm the only one with access, its a dedicated server that hosts my minecraft server also.

Is there a repair for this, or will I loose all my data?
 
How did you move the database?
You can't do it just by copying the files, it needs to be a dump and restore.
It's a little late for him. He is going to have to run a repair. Seems as if the server did not have a graceful shut down so the files are not immediately viable.

I am no expert and don't wish to advise, but to point you in one direction. You can start the server with
innodb_force_recovery set in your config and do a dump

http://dev.mysql.com/doc/refman/5.0/en/forcing-innodb-recovery.html

I would make sure you have a copy of the files and honestly would consult an expert or a service that specializes in database recovery.
 
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.
 
If you have "file per table" enabled for InnoDB, there will be an .IBD file, but you still can't copy it manually.

I have had this argument before. Thats not what I have seen in the manual. http://dev.mysql.com/doc/refman/5.0/en/innodb-migration.html
You can move an InnoDB database simply by copying all the relevant files listed inSection 14.2.5, “Backing Up and Recovering an InnoDB Database”.

You can't copy a single table. You need ALL of the files.

If you are able to shut down your MySQL server, you can make a binary backup that consists of all files used byInnoDB to manage its tables. Use the following procedure:

  1. Shut down the MySQL server and make sure that it stops without errors.

  2. Copy all InnoDB data files (ibdata files and .ibd files) into a safe place.

  3. Copy all the .frm files for InnoDB tables to a safe place.

  4. Copy all InnoDB log files (ib_logfile files) to a safe place.

  5. Copy your my.cnf configuration file or files to a safe place.

Thats not to say it isn't stupid. It is.

If he no longer has the server that is dead in the water, then the only data he has is in those files. I believe some of it to be recoverable, not to say there would be enough to even bother with.
 
Last edited:
It seems I have all .frm files + 1 supercra_forums.sql, if I reupload the supercra_forums.sql file will it work?

The previous data is gone, I had to reinstall the OS, I do have the files that I downloaded on my computer but, they are all frm+ 1 sql file
 
Top Bottom