lilgreg70
Sat 20th Oct '01, 4:17pm
(This document is really intended for those individuals who have trouble restoring their database they backed up using the vb admin cp feature!This document may be of help to some other people with similar problems also...)
Here's how to restore your backup database from a local pc (if your running your forums on windows 2000 or your own pc with php and mysql like myself)
Procedure 1:
1) Open MS-DOS
2) Type
cd \mysql\bin
2.5) If you haven't already created the new database,do that now, typing these commands: (I recommend using the create new database feature in mysqladmin so you can skip down to step 3 and start from there restoring)
2.51) mysql -uUSERNAME -pPASSWORD
2.52) create database NEWDBNAME;
2.53) exit;
3) Type
mysql -uUSERNAME -pPASSWORD NEWDBNAME < /path/to/dump.sql
It's probably easiest if you put this dump file in the c:\mysql\bin directory to start with, then just use dump.sql for the name/path, like so:
mysql -uUSERNAME -pPASSWORD NEWDBNAME < dump.sql
4) Wait.
5) It'll return to the prompt when done.
Procedure 2: (only follow this Procedure if you get a error as described below!)
If you get an error(usually that syntax error thing that happens when you dump/backup your database using the backup controls from the vb admin CP),just got to your custom avatars query in your backup.sql file (I recommend using ultraedit for this because using notepad with large backups will cause your pc to F*** up,so d/l ultraedit and install it first to open your backup) and DELETE EVERYTHING in between it and the query itself.Make sure to leave 3 spaces in between your queries though.
Example:
DROP TABLE IF EXISTS customavatar;
CREATE TABLE customavatar (
userid int(10) unsigned NOT NULL,
avatardata mediumtext NOT NULL,
dateline int(10) unsigned NOT NULL,
filename varchar(100) NOT NULL,
PRIMARY KEY (userid)
);
INSERT INTO customavatar VALUES('64','ÿØÿà\0JFIF\0\0H\0H\0\0ÿí
Photoshop 3.0\08BIMí
Resolution\0\0\0\0\0H\0\0\0\0\0H\0\0\0\08BIM
FX Global Lighting Angle\0\0\0\0\0\0\08BIMFX Global Altitude\0\0\0\0\0\0\08BIMóPrint Flags\0\0\0 \0\0\0\0\0\0\0\0\08BIM
Copyright Flag\0\0\0\0\0\08BIM\'Japanese Print Flags\0\0\0\0
\0\0\0\0\0\0\0\08BIMõColor Halftone Settings\0\0\0H\0/ff\0\0lff\0\0\0\0\0\0\0/ff\0\0¡™š\0\0\0\0\0\0\02\0\0\0\0Z\0\0\0\0\0\0 \0\0\05\0\0\0\0-\0\0\0\0\0\0\0\08BIMøColor Transfer Settings\0\0\0p\0\0ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿè\0\0\0\ 0ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿè\0\0\0\0ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿè\0\0\0\0ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿè\0\08BIM Guides\0\0\0\0\0\0\0\0\0@\0\0@\0\0\0\08BIM
URL overrides\0\0\0\0\0\0\08BIMSlices\0\0\0\0g\0\0 \0\0\0\0\0\0\0\0\0\0\0\02\0\0\0*\0\0\0\0a\0s\0h\ 0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\ 0\0\0\0\0\0\0\0\0*\0\0\02\0\0\0\0\0\0\0\0\0\0\0\0\ 0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\08BIM ICC Untagged Flag\0\0\0\08BIMLayer ID Generator Base\0\0\0\0\0\08BIMNew Windows Thumbnail\0\0o\0\0\0\0\0\0*\0\0\02\0\0\0€\0\0\0 \0\0S\0\0ÿØÿà\0JFIF\0\0H\0H\0\0ÿî\0Adobe\0 d€\0\0\0ÿÛ\0„\0
blah,blah,blah!;
Delete all of that down to your next query leaving three space between your queries,and save.
Now install your vbulletin (assuming you don't have it installed yet) and then go to the next Procedure!
Procedure 3:
Now Retry to restore your database using MS-DOS with the file we edited above.You should not get any errors now and your forum should be good as new!
Here's how to restore your backup database from a local pc (if your running your forums on windows 2000 or your own pc with php and mysql like myself)
Procedure 1:
1) Open MS-DOS
2) Type
cd \mysql\bin
2.5) If you haven't already created the new database,do that now, typing these commands: (I recommend using the create new database feature in mysqladmin so you can skip down to step 3 and start from there restoring)
2.51) mysql -uUSERNAME -pPASSWORD
2.52) create database NEWDBNAME;
2.53) exit;
3) Type
mysql -uUSERNAME -pPASSWORD NEWDBNAME < /path/to/dump.sql
It's probably easiest if you put this dump file in the c:\mysql\bin directory to start with, then just use dump.sql for the name/path, like so:
mysql -uUSERNAME -pPASSWORD NEWDBNAME < dump.sql
4) Wait.
5) It'll return to the prompt when done.
Procedure 2: (only follow this Procedure if you get a error as described below!)
If you get an error(usually that syntax error thing that happens when you dump/backup your database using the backup controls from the vb admin CP),just got to your custom avatars query in your backup.sql file (I recommend using ultraedit for this because using notepad with large backups will cause your pc to F*** up,so d/l ultraedit and install it first to open your backup) and DELETE EVERYTHING in between it and the query itself.Make sure to leave 3 spaces in between your queries though.
Example:
DROP TABLE IF EXISTS customavatar;
CREATE TABLE customavatar (
userid int(10) unsigned NOT NULL,
avatardata mediumtext NOT NULL,
dateline int(10) unsigned NOT NULL,
filename varchar(100) NOT NULL,
PRIMARY KEY (userid)
);
INSERT INTO customavatar VALUES('64','ÿØÿà\0JFIF\0\0H\0H\0\0ÿí
Photoshop 3.0\08BIMí
Resolution\0\0\0\0\0H\0\0\0\0\0H\0\0\0\08BIM
FX Global Lighting Angle\0\0\0\0\0\0\08BIMFX Global Altitude\0\0\0\0\0\0\08BIMóPrint Flags\0\0\0 \0\0\0\0\0\0\0\0\08BIM
Copyright Flag\0\0\0\0\0\08BIM\'Japanese Print Flags\0\0\0\0
\0\0\0\0\0\0\0\08BIMõColor Halftone Settings\0\0\0H\0/ff\0\0lff\0\0\0\0\0\0\0/ff\0\0¡™š\0\0\0\0\0\0\02\0\0\0\0Z\0\0\0\0\0\0 \0\0\05\0\0\0\0-\0\0\0\0\0\0\0\08BIMøColor Transfer Settings\0\0\0p\0\0ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿè\0\0\0\ 0ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿè\0\0\0\0ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿè\0\0\0\0ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿè\0\08BIM Guides\0\0\0\0\0\0\0\0\0@\0\0@\0\0\0\08BIM
URL overrides\0\0\0\0\0\0\08BIMSlices\0\0\0\0g\0\0 \0\0\0\0\0\0\0\0\0\0\0\02\0\0\0*\0\0\0\0a\0s\0h\ 0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\ 0\0\0\0\0\0\0\0\0*\0\0\02\0\0\0\0\0\0\0\0\0\0\0\0\ 0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\08BIM ICC Untagged Flag\0\0\0\08BIMLayer ID Generator Base\0\0\0\0\0\08BIMNew Windows Thumbnail\0\0o\0\0\0\0\0\0*\0\0\02\0\0\0€\0\0\0 \0\0S\0\0ÿØÿà\0JFIF\0\0H\0H\0\0ÿî\0Adobe\0 d€\0\0\0ÿÛ\0„\0
blah,blah,blah!;
Delete all of that down to your next query leaving three space between your queries,and save.
Now install your vbulletin (assuming you don't have it installed yet) and then go to the next Procedure!
Procedure 3:
Now Retry to restore your database using MS-DOS with the file we edited above.You should not get any errors now and your forum should be good as new!