Restore Database

[expired user #3289]'s profile image [expired user #3289] posted 15 years ago in General Permalink
What is the fastest and easiest way to restore a database from a recent backup?

BACKGROUND:

My host says that, at least, one of my online message board tables is corrupted and beyond fixing.

So, he recommends that I restore the database, from a trusted backup.

Problem is that, I created the online database via HeidiSQL, years ago, and now I forget how it's done.

So, please point me in the right direction!

- j unhappy
[expired user #3289]'s profile image [expired user #3289] posted 15 years ago Permalink
Incidentally, when I try to access my message board, I get the following error message:




phpBB : Critical Error

Error creating new session

DEBUG MODE

SQL Error : 1062 Duplicate entry '-1' for key 2

INSERT INTO phpbb2_sessions (session_id, session_user_id, session_start, session_time, session_ip, session_page, session_logged_in, session_admin) VALUES ('f03c15bea9a6767fef03ba9481a23a06', -1, 1275448500, 1275448500, 'd1c34890', 0, 0, 0)

Line : 187
File : sessions.php




- j
ansgar's profile image ansgar posted 15 years ago Permalink
> What is the fastest and easiest way to restore a database from a recent backup?

I guess this backup is a SQL file? If so, just load it into Heidi's query editor and press F9.

To create a backup, just click Export > Export database as SQL.
[expired user #6503]'s profile image [expired user #6503] posted 12 years ago Permalink
This doesn't seem to work.

I have a large database (29 Mb mysql dump file) that I need to restore.

HeidiSQL loads the file into memory (after warning that it will use a lot of memory).

F9 does nothing other than generating the following message - "/* 0 rows affected, 0 rows found. Duration for 0 queries: 0.000 sec. */".
kalvaro's profile image kalvaro posted 12 years ago Permalink
This thread is two years old and talks about loading a dump into the editor. If you have any problem loading dumps into memory, please open a new thread and provide some information. Don't assume the feature is just broken because it isn't.

Please login to leave a reply, or register at first.