marhasan
Member
Posted 1 month ago #
I'm trying to move wordpress from one server to another. Once I try to upload the sql file I get this:
#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 'DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci' at line 12
Please, if anyone knows how I can fix this it would be very much appreciated.
marhasan
Member
Posted 1 month ago #
where are you uploading that to?
marhasan
Member
Posted 1 month ago #
Phpmyadmin. It's a back-up sql file.
marhasan
Member
Posted 1 month ago #
Basically I have an SQL back-up file of a previous installation of Wordpress and I'm trying to move it to another server. When I try to upload the back up I get that error.
ok,
open it in a plain text editor. whats on lines 1-15?
marhasan
Member
Posted 1 month ago #
-- phpMyAdmin SQL Dump
-- version 2.8.2.4
-- http://www.phpmyadmin.net
--
-- Host: localhost:3306
-- Generation Time: Sep 29, 2009 at 10:45 AM
-- Server version: 4.1.20
-- PHP Version: 5.0.5
--
-- Database: foster_wordpress
--
CREATE DATABASE foster_wordpress DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
USE foster_wordpress;
-- --------------------------------------------------------
marhasan
Member
Posted 1 month ago #
yes.
immesnsely.
what you probably want to do is NOT let that create the db. You do that. so backup that dump file, then edit it to remove the Create database ... crap.
You also dont need to tell it what DB to use, so remove that USE statement also.
save the file.
Then you create the db.
marhasan
Member
Posted 1 month ago #