Database import failing - SOS

I need to import my saved backup database (text editor) into the database that is attached to my clients site here. It fails on import citing…#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 ‘{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf360
{\fonttbl\f0\fswiss\fcharset’ at line 1

I REALLY need to get this db attached to this site. What am I doing wrong? What do I need to do? Is there any way to open the current db file and paste in the new information. I can’t rebuild this site.

The file you’ve uploaded is not a MySQL backup. Judging from the error message, it’s an RTF word processor document.

If the file actually does contain MySQL data (how on earth did you end up with that?), you may be able to resave it as a plain text file (.txt) and uploading that. If not, you’ll need to get an actual database backup to upload.

How’d I manage that? just lucky - when I screw things up I go the whole 9. So, I went to the orginal back.sql and resaved the other as txt and got the same error for both.

SQL query:

– -- Dumping data for table wp_ncbxu8_bwbps_galleries – INSERT INTO wp_ncbxu8_bwbps_galleries (gallery_id, post_id, gallery_name, gallery_description, gallery_type, caption, add_text, upload_form_caption, contrib_role, anchor_class, img_count, img_rel, img_class, img_perrow, img_perpage, mini_aspect, mini_width, mini_height, thumb_aspect, thumb_width, thumb_height, medium_aspect, medium_width, medium_height, image_aspect, image_width, image_height, show_caption, nofollow_caption, caption_template, show_imgcaption, img_status, allow_no_image, suppress_no_image, default_image, created_date, updated_date, layout_id, use_customform, custom_formid, use_customfields, cover_imageid, status, sort_field, sort_order, poll_id, rating_position, hide_toggle_ratings, pext_insert_setid, max_user_uploads, uploads_period) VALUES (1, 0, ‘Who\’‘s Wearing MMTM’, ‘’, 0, NULL, ‘Add Photo’, […]

MySQL said: Documentation
#1062 - Duplicate entry ‘1’ for key ‘PRIMARY’

Considering death by turkey. Any ideas??

That error sounds as though you’re trying to import data into a database that isn’t empty (so it’s complaining that it can’t overwrite the existing data). If you’re ABSOLUTELY SURE you want to do this, you may need to delete the existing tables before importing your backup.

Death by turkey sounds good. I think I’ll take that? :slight_smile:

I’m new to Dreamhost. BUT I can see my database on the database page it does NOT have phpMyAdmin as an option just my user access name. Can I
HOW do move this database to be the one connected to the site/hostname instead of the one that is current there??
CAN I back this one up somehow and use it as the import since the current backup is generating this error.

Passed desperate about 3 hours ago. :frowning:

can’t be worse then it is I guess. That db isn’t helping me any. Do I just drop the files?

So dropping the files and importing worked. I got rid of the error and was able to import, but it’s not “seeing it”. I know the right code is in the db and I think the db is connected to the site, but no joy.

Also, even tho my photos are on the site (ftp) they aren’t showing up in WP when I log it. No pages etc.


If you uploaded the photo’s in the old WP, they are in the upload folder e.g. 2012/01 or 2012/02
You will need to have them exactly where they where in the old WP.

Or you change the post/pages for the URL which point to the photo’s

You may have figured this out already, but I was curious if you have changed the mysql host to reflect the new domain host you would have needed to setup in Wordpress. Or did you use the one-click installer?

I used the phpAdmin to “backup” the database and then used one click to install. The backup didn’t work correctly and the one click did not attach the backup to the site. It was a complete FUBR moment. Burned to the ground. I had to rebuild.

I had changed the host. The problem was the flawed backup and truly horrible tech support here.