SMF Support > Install and Upgrade Help
Errors uploading .sql file to database.
(1/1)
Nosmo:
Before I shut down my last smf forum I downloaded the database though the SMF admin page. I was unable to compress as a Gzip file and the only way I could get the file was separate and without compression. So now I have 2 files data.sql and structure.sql.
What I can recall. Forum was 2.0.x??? not sue if it was 2 or 1?
Moving forward, I have a new site and I am trying to import the database on phpmyadmin, but I run into errors.
First when I import the structure I get this error:
--- Code: ---SQL query:
CREATE TABLE `smf_ajaxchat_bans` (
`userID` INT( 11 ) NOT NULL DEFAULT,
`userName` VARCHAR( 64 ) NOT NULL DEFAULT '',
`dateTime` DATETIME NOT NULL DEFAULT '',
`ip` VARBINARY( 16 ) NOT NULL DEFAULT ''
) ENGINE = MYISAM ;
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 '
`userName` varchar(64) NOT NULL default '',
`dateTime` datetime NOT NULL defa' at line 2
--- End code ---
So my first thought is I do not want most of the BS that was on this forum, I really just want the meet of the post for history. The forum will not be active. So I start hacking out lines that I don't feel I'd ever use. Stating with the Ajax chat. I keep uploading the file and hacking out tables that is just not necessary. I finally get the structure in with no errors. (I do have another copy of the original before I started playing doctor)
I move onto uploading the data.sql file and then I get this error.
--- Code: ---MySQL said:
#1146 - Table 'originalf4.smf_ajaxchat_messages' doesn't exist
--- End code ---
Only problem is when I try to hack out any of the ajax tables I just error out on almost everything left in the file. Is there something to check the sql files prior to uploading? can anyone steer me in the right direction? I'm going to make a fresh install and upload ajax chat and see it will take. Thanks for reading and for any help.
Nosmo:
So I tried installing ajax chat to see if it would add the tables I needed no luck. Can I just manually add the tables? I really don't care if they work or not. Like I said I'm just looking for the meet of the posting data.
CapadY:
Never ever trust a database backup made via the SMFadmin page. It's at least a little buggy.
emanuele:
I find this query strange.
VARBINARY as far as I remember is not used in SMF... (the specific field should be a varchar)
The actual problem should be "DEFAULT" in this line:
--- Code: --- `userID` INT( 11 ) NOT NULL DEFAULT,
--- End code ---
it should not be there, while the field should be an autoincrement...
Navigation
[0] Message Index
Go to full version