News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

SQL import error 1064

Started by quoddy, October 14, 2013, 10:42:31 AM

Previous topic - Next topic

quoddy

I have SMF 2.0 RC1 running via MAMP on my MacBookPro.   Others want to access it so I backed up via "Forum Maintenance" w all three boxes checked.

New SMF 2.0.5 on Bluehost and used PHPMyAdmin to import gzipped database.

QuoteError
SQL query:

CREATE TABLE  `smf_admin_info_files` (

id_file TINYINT( 4 ) UNSIGNED NOT NULL AUTO_INCREMENT ,
filename TINYTEXT NOT NULL ,
path TINYTEXT NOT NULL ,
parameters TINYTEXT NOT NULL ,
data TEXT NOT NULL ,
filetype TINYTEXT NOT NULL ,
PRIMARY KEY ( id_file ) ,
KEY filename( filename( 30 ) )
) TYPE = MYISAM ;

MySQL said: Documentation

#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 'TYPE=MyISAM' at line 10

Can anyone offer some insight into what is causing the problem?

margarett

Actually you can't do it like that.

You have to convert to 2.0.5 BEFORE you import it to your host.
Second, please use phpmyadmin to dump your database.

Now, about that error... What MySQL versions do you run, either on your server and your local machine?
If you dump via phpmyadmin, there are some export compatibility options that might help with that, not sure though...
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Kindred

actually, you don't have to upgrade first.

He could do the db import, upload settings.php from the old site and correct the urls and paths...
then upload the large upgrade package and run upgrade,php
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

margarett

I find it more "safe" to do it in localhost :P
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

quoddy

My local machine is a MacBookPro (OSX 10.8.4) running MAMP
   MySQL   5.5.9
   PHPMyAdmin   3.3.9.2
   PHP  5.3.6

Online server is Bluehost.com  (Linux 2.6.32-20130307.60.9.bh6.x86_64)
http://headache.quoddy.ca
   MySQL   5.5.34-log
   PHPMyAdmin   3.4.11.1
   PHP   5.2.17

vbgamer45

Also I think the error is due to TYPE = MYISAM
TYPE no longer supported.

You need to replace TYPE= to Engine=
In order to work in the file.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

quoddy

I have Exported from laptop using PHPMyAdmin.

Logged into the BlueHost server PHPMyAdmin and attempted to Import the file.

QuoteError
SQL query:

--
-- Database: `smf1`
--
-- --------------------------------------------------------
--
-- Table structure for table `smf_admin_info_files`
--
CREATE TABLE  `smf_admin_info_files` (

`id_file` TINYINT( 4 ) UNSIGNED NOT NULL AUTO_INCREMENT ,
`filename` TINYTEXT NOT NULL ,
`path` TINYTEXT NOT NULL ,
`parameters` TINYTEXT NOT NULL ,
`data` TEXT NOT NULL ,
`filetype` TINYTEXT NOT NULL ,
PRIMARY KEY (  `id_file` ) ,
KEY  `filename` (  `filename` ( 30 ) )
) ENGINE = MYISAM DEFAULT CHARSET = latin1 AUTO_INCREMENT =8;

MySQL said: Documentation

#1050 - Table 'smf_admin_info_files' already exists

Well of course "smf_admin_info_files" already exists.   I installed SMF and a shell database is created.   PHPMyAdmin shows the table structure exists but the data is what I am trying to move.   How do I indicate to PHPMyAdmin that I am importing a populated database to an empty database with the same table structure?   I don't need to recreate the tables that are already in place.

and VBGamer45,  I notice that "Type = MyISAM" is now indicated as "ENGINE = MYISAM".

Arantor

You're not really supposed to perform an import into an existing install as already indicated above ;)

quoddy

Got it.

Deleted database that install had created and then created an empty database with same name.  Import worked without errors.

I have some default theme directory issues but the data seems to be there.   Should have that fixed tonight.

Thanks everyone for the help.

Bigguy


Advertisement: