Jump to content

Recommended Posts

I'm trying to move a forum to another host, so i dumped up the MySQL database but I can't seem to get it to install on my new host.

 

Here's an example of the code in the SQL file I'm trying to upload

 

CREATE TABLE `bbnboard_auth_access` (
  `group_id` mediumint( NOT NULL default '0',
  `forum_id` smallint(5) unsigned NOT NULL default '0',
  `auth_view` tinyint(1) NOT NULL default '0',
  `auth_read` tinyint(1) NOT NULL default '0',
  `auth_post` tinyint(1) NOT NULL default '0',
  `auth_reply` tinyint(1) NOT NULL default '0',
  `auth_edit` tinyint(1) NOT NULL default '0',
  `auth_delete` tinyint(1) NOT NULL default '0',
  `auth_sticky` tinyint(1) NOT NULL default '0',
  `auth_announce` tinyint(1) NOT NULL default '0',
  `auth_vote` tinyint(1) NOT NULL default '0',
  `auth_pollcreate` tinyint(1) NOT NULL default '0',
  `auth_attachments` tinyint(1) NOT NULL default '0',
  `auth_mod` tinyint(1) NOT NULL default '0',
  KEY `group_id` (`group_id`),
  KEY `forum_id` (`forum_id`)
) ENGINE=MyISAM;

 

I get this error using BigDump (similar error shows up in phpMyAdmin)

 

Error at the line 36: ) ENGINE=MyISAM;

Query: -- phpMyAdmin SQL Dump
CREATE TABLE `bbnboard_auth_access` (
`group_id` mediumint( NOT NULL default '0',
`forum_id` smallint(5) unsigned NOT NULL default '0',
`auth_view` tinyint(1) NOT NULL default '0',
`auth_read` tinyint(1) NOT NULL default '0',
`auth_post` tinyint(1) NOT NULL default '0',
`auth_reply` tinyint(1) NOT NULL default '0',
`auth_edit` tinyint(1) NOT NULL default '0',
`auth_delete` tinyint(1) NOT NULL default '0',
`auth_sticky` tinyint(1) NOT NULL default '0',
`auth_announce` tinyint(1) NOT NULL default '0',
`auth_vote` tinyint(1) NOT NULL default '0',
`auth_pollcreate` tinyint(1) NOT NULL default '0',
`auth_attachments` tinyint(1) NOT NULL default '0',
`auth_mod` tinyint(1) NOT NULL default '0',
KEY `group_id` (`group_id`),
KEY `forum_id` (`forum_id`)
) ENGINE=MyISAM;

MySQL: You have an error in your SQL syntax near '-- phpMyAdmin SQL Dump CREATE TABLE `bbnboard_auth_access` ( `group_id` med' at line 1

 

although when I add this other SQL file for PhpNuke, it works fine. the syntax appears to be the same, so I don't know where the problem is!

 

CREATE TABLE `nuke2_access` (
  `access_id` int(10) NOT NULL auto_increment,
  `access_title` varchar(20) default NULL,
  PRIMARY KEY  (`access_id`)
) TYPE=MyISAM;

 

Could someone please help me!? I can't lose anything from my forum!

Link to comment
https://forums.phpfreaks.com/topic/56302-problem-creating-tables/
Share on other sites

the line isnt commented. thats just how the error is displayed.

look closer at the first code in my post.

the error seems to be something to do with this line.

 

) ENGINE=MyISAM;

 

I don't see how thats a problem. I even tried changing ENGINE to TYPE but it gives the same error.

thats just in the error. its NOT in the code itself.

 

CREATE TABLE `bbnboard_auth_access` (
  `group_id` mediumint( NOT NULL default '0',
  `forum_id` smallint(5) unsigned NOT NULL default '0',
  `auth_view` tinyint(1) NOT NULL default '0',
  `auth_read` tinyint(1) NOT NULL default '0',
  `auth_post` tinyint(1) NOT NULL default '0',
  `auth_reply` tinyint(1) NOT NULL default '0',
  `auth_edit` tinyint(1) NOT NULL default '0',
  `auth_delete` tinyint(1) NOT NULL default '0',
  `auth_sticky` tinyint(1) NOT NULL default '0',
  `auth_announce` tinyint(1) NOT NULL default '0',
  `auth_vote` tinyint(1) NOT NULL default '0',
  `auth_pollcreate` tinyint(1) NOT NULL default '0',
  `auth_attachments` tinyint(1) NOT NULL default '0',
  `auth_mod` tinyint(1) NOT NULL default '0',
  KEY `group_id` (`group_id`),
  KEY `forum_id` (`forum_id`)
) ENGINE=MyISAM;

 

thats EXACTLY how my SQL file looks, except that its much longer of course.

there's no wierd characters. it only shows up when there's an error. they are caused by the BigDump file.

i appreciate you trying to help me though. maybe you could try to run this code with BigDump on your host to see whats happens? thanks.

 

this is what shows up when trying it with phpMyAdmin

 

You have an error in your SQL syntax near 'CREATE TABLE `bbnboard_auth_access` (
  `group_id` mediumint( NOT NULL defa' at line 1

 

could it be the file encoding? if so, how would i fix it?

OK, so maybe those characters were there when viewed with Vim... stupid notepad and dreamweaver  :P

 

but the problem is still happening though

 

Error at the line 36: ) ENGINE=MyISAM;

Query: CREATE TABLE `bbnboard_auth_access` (
`group_id` mediumint( NOT NULL default '0',
`forum_id` smallint(5) unsigned NOT NULL default '0',
`auth_view` tinyint(1) NOT NULL default '0',
`auth_read` tinyint(1) NOT NULL default '0',
`auth_post` tinyint(1) NOT NULL default '0',
`auth_reply` tinyint(1) NOT NULL default '0',
`auth_edit` tinyint(1) NOT NULL default '0',
`auth_delete` tinyint(1) NOT NULL default '0',
`auth_sticky` tinyint(1) NOT NULL default '0',
`auth_announce` tinyint(1) NOT NULL default '0',
`auth_vote` tinyint(1) NOT NULL default '0',
`auth_pollcreate` tinyint(1) NOT NULL default '0',
`auth_attachments` tinyint(1) NOT NULL default '0',
`auth_mod` tinyint(1) NOT NULL default '0',
KEY `group_id` (`group_id`),
KEY `forum_id` (`forum_id`)
) ENGINE=MyISAM;

MySQL: You have an error in your SQL syntax near 'ENGINE=MyISAM' at line 18

 

???

Error at the line 36: )ENGINE=MyISAM;

Query: CREATE TABLE `bbnboard_auth_access` (
`group_id` mediumint( NOT NULL default '0',
`forum_id` smallint(5) unsigned NOT NULL default '0',
`auth_view` tinyint(1) NOT NULL default '0',
`auth_read` tinyint(1) NOT NULL default '0',
`auth_post` tinyint(1) NOT NULL default '0',
`auth_reply` tinyint(1) NOT NULL default '0',
`auth_edit` tinyint(1) NOT NULL default '0',
`auth_delete` tinyint(1) NOT NULL default '0',
`auth_sticky` tinyint(1) NOT NULL default '0',
`auth_announce` tinyint(1) NOT NULL default '0',
`auth_vote` tinyint(1) NOT NULL default '0',
`auth_pollcreate` tinyint(1) NOT NULL default '0',
`auth_attachments` tinyint(1) NOT NULL default '0',
`auth_mod` tinyint(1) NOT NULL default '0',
KEY `group_id` (`group_id`),
KEY `forum_id` (`forum_id`)
)ENGINE=MyISAM;

MySQL: You have an error in your SQL syntax near 'ENGINE=MyISAM' at line 18

 

this is starting to get on my nerves... i just want my forum back :-[

ah! it worked just changing ENGINE to TYPE (don't know why I didn't try it again sooner)

 

but now i'm having another problem a little further down the SQL file. that figures :P

 

Error at the line 2182: ) TYPE=MyISAM AUTO_INCREMENT=4586 ;

Query: CREATE TABLE `bbnboard_search_wordlist` (
`word_text` varchar(50) character set latin1 collate latin1_bin NOT NULL default '',
`word_id` mediumint( unsigned NOT NULL auto_increment,
`word_common` tinyint(1) unsigned NOT NULL default '0',
PRIMARY KEY (`word_text`),
KEY `word_id` (`word_id`)
) TYPE=MyISAM AUTO_INCREMENT=4586 ;

MySQL: You have an error in your SQL syntax near 'character set latin1 collate latin1_bin NOT NULL default '', `word_id` mediumi' at line 2

 

this is turning out to be nothing but problems. the last time i moved my forum, the database transferred just fine.

 

thanks a lot for getting me this far! ;D

As far as I know, I think I fixed it by removing character set latin1 collate latin1_bin completely.

it finally went through successfully on my local test server, but I won't know for sure until I try it on my live host.

i'm currently having problems connecting to the FTP because of too many users. I'll post back if there's any more problems.

 

thanks again for helping me out!! ;D

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.