Restoring my forum from a MySQL backup, I need help!

Status
Not open for further replies.

White_Wolf

Baseband Member
Messages
92
Long story short, my old host's server is ruined and I switched to a new host, and signed up with a Virtual Dedicated Server.

I want to put my SMF forum back up the way it was. So what I did was download everything from the old server in the folder "/forum", and then uploaded into my new server.

Now I need to install the old database. I have a backup of the old MySQL database from just last week, and I am trying to restore it, but I am running into some problems.

The server environment the database file was saved from looks like this:
Linux (Kernel version 2.6.9-42.ELsmp)
MySQL 4.1.22-standard
Apache version 1.3.39 (Unix)
PERL version 5.8.8
PHP version 5.2.5

The new server environment I am trying to install the database to looks like this:
Linux Fedora (I believe fedora5)
Mysql 5.0.27-1.fc5
Perl-Apache-ASP 2.59-fc5.build82070706.15
Php 5.1.6-1.2

On getting a virtual dedicated server, I realize I may have gotten in over my head. The interface is a control panel called Plesk.
With Plesk I have created a database name, created a user account for it, and when I try to import the database file residing on my hard disk, I get some errors.

The first error I get is:
Error
SQL query:

CREATE TABLE `smf_arcade_favorite` (

ID_FAVORITE int( 10 ) unsigned NOT NULL AUTO_INCREMENT ,
ID_MEMBER int( 10 ) unsigned NOT NULL default '',
ID_GAME int( 10 ) unsigned NOT NULL default '',
PRIMARY KEY ( ID_FAVORITE )
) TYPE = MYISAM ;



MySQL said:

#1067 - Invalid default value for 'ID_MEMBER'

I looked in the SQL file and the first mention of ID_MEMBER is this
# ==========================================================
#
# Database dump of tables in `XXXXXX_forum`
# January 11, 2008, 10:59:18 PM
#
# ==========================================================


#
# Table structure for table `smf_arcade_categories`
#

DROP TABLE IF EXISTS `smf_arcade_categories`;

CREATE TABLE `smf_arcade_categories` (
ID_CAT int(10) unsigned NOT NULL auto_increment,
catName varchar(20) NOT NULL default '',
numGames int(10) unsigned NOT NULL default 0,
numPlays int(10) unsigned NOT NULL default 0,
numRates int(10) unsigned NOT NULL default 0,
gameRate int(10) unsigned NOT NULL default 0,
catOrder int(10) unsigned NOT NULL default 0,
special int(10) unsigned NOT NULL default 0,
memberGroups varchar(255) NOT NULL default '',
PRIMARY KEY (ID_CAT)
) TYPE=MyISAM;

#
# Dumping data in `smf_arcade_categories`
#

INSERT INTO `smf_arcade_categories`
(`ID_CAT`, `catName`, `numGames`, `numPlays`, `numRates`, `gameRate`, `catOrder`, `special`, `memberGroups`)
VALUES (1, 'IBP', 0, 0, 0, 0, 0, 1, '0,2,9,4,5,6,7,8'),
(2, 'phpBB', 0, 0, 0, 0, 0, 0, '0,2,9,4,5,6,7,8'),
(3, 'default', 0, 0, 0, 0, 0, 0, '0,2,9,4,5,6,7,8'),
(4, 'Flash247', 0, 0, 0, 0, 0, 0, '0,2,9,4,5,6,7,8');
# --------------------------------------------------------

#
# Table structure for table `smf_arcade_favorite`
#

DROP TABLE IF EXISTS `smf_arcade_favorite`;

CREATE TABLE `smf_arcade_favorite` (
ID_FAVORITE int(10) unsigned NOT NULL auto_increment,
ID_MEMBER int(10) unsigned NOT NULL default '',
ID_GAME int(10) unsigned NOT NULL default '',
PRIMARY KEY (ID_FAVORITE)
) TYPE=MyISAM;

Not knowing what any of that stuff means, I decided to just manually edit the SQL file, and remove everything in the begining of the file pertaining to the "SMF_Arcade". I then saved it as a seperate SQL file and tried to import it. When I done that I get this error:
Error
SQL query:

# ==========================================================
#
# Database dump of tables in `xxxxxx_forum`
# January 11, 2008, 10:59:18 PM
#
# ==========================================================
#
# Table structure for table `smf_attachments`
#
DROP TABLE IF EXISTS `smf_attachments` ;



MySQL said:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '

DROP TABLE IF EXISTS `smf_attachments`' at line 1

So again, the very first peice of text it comes across it finds an error with it.
I really don't know what to do. Any help would be nice.
 
Well, this bit here makes no sense:

Error
SQL query:

CREATE TABLE `smf_arcade_favorite` (

ID_FAVORITE int( 10 ) unsigned NOT NULL AUTO_INCREMENT ,
ID_MEMBER int( 10 ) unsigned NOT NULL default '',
ID_GAME int( 10 ) unsigned NOT NULL default '',
PRIMARY KEY ( ID_FAVORITE )
) TYPE = MYISAM ;



MySQL said:

#1067 - Invalid default value for 'ID_MEMBER'

More specifically, ID_MEMBER int( 10 ) unsigned NOT NULL default '',.

It's saying to make it NOT NULL (meaning it can't be empty) but then the default value it is trying to set is empty (or, null). So, remove that (default '').

Code:
CREATE TABLE `smf_arcade_favorite` (

ID_FAVORITE int( 10 ) unsigned NOT NULL AUTO_INCREMENT ,
ID_MEMBER int( 10 ) unsigned NOT NULL,
ID_GAME int( 10 ) unsigned NOT NULL,
PRIMARY KEY ( ID_FAVORITE )
)

That should work.
 
Thanks for the reply.
I was able to find a friend who was able to modify the SQL file. He claims the problem had something to do with the charset being in "UTF-8 BOM" rather than plain UTF-8

He was able to modify the SQL text, and import it, and synchronize the database with the static files, and with a lot of work to the SMF forum, I've gotten the forum to work, and all of our old posts are there.

However, there is still one problem: the forum moves super slow. With no more than one or two people viewing the forum, it is taking around 10 seconds to create a page with only 28 queries on it.

At first I thought we'd been duped into buying a super slow virtual dedicated server, but then I realized that the homepage (all HTML) moves super fast. Navigating through the html files on my site is as fast as if they were on my local hard drive.

So I don't think it's the server.
Though the FTP does also seem very slow.

Question on virtual dedicated servers:
Does the activities of my neighbor on the same physical (different virtual) server impact my bandwidth, CPU, and RAM usage?

It was my assumption that x amount of bandwidth, ram, and CPU were allotted to each individual, and that no matter what type of activity any one user does, it does not affect the other virtual server users.

I just wanted to see if I got that right.
 
Status
Not open for further replies.
Back
Top Bottom