Moving Drupal Site to Local Host Error

posterns - November 11, 2009 - 02:44

I have a friend who has a Drupal site that is on a host server. She would like me to make some modifications to it. I'm just learning Drupal and figured I could export the database from the host site (and all files) and then set up a test site on my MacPro. I have already used MAMP to set up a couple of test sites and they work fine. This is however the first time trying to copy an existing site to move into my localhosting setup.

So here is what I did. First, in MAMP created a new database for the new test site (using the name of the online database name). Then exported the database with all the tables using phpMYAdmin from host server to my computer. Also downloaded all the site files and put them into a new directory in the httpdocs folder (\shavilan). Then tried to see if I could see anything. First got Drupal message that the site was down. Then read where I should edit the settings.php.file to use my localhost name and password. Now if I try to access the page there is just a blank page, as I assume I have no database files. So, then went into MAMP and phpMYAdmin and tried to import the database file that I downloaded. Whenever I try to import it, I get the following error message:

Error
SQL query:

-- phpMyAdmin SQL Dump
-- version 2.6.0-pl3
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Nov 10, 2009 at 10:13 AM
-- Server version: 5.0.51
-- PHP Version: 4.4.9
--
-- Database: `shavilan`
--
-- --------------------------------------------------------
--
-- Table structure for table `access`
--
DROP TABLE IF EXISTS `access` ;

CREATE TABLE `access` (

`aid` INT( 11 ) NOT NULL AUTO_INCREMENT ,
`mask` VARCHAR( 255 ) NOT NULL DEFAULT '',
`type` VARCHAR( 255 ) NOT NULL DEFAULT '',
`status` TINYINT( 4 ) NOT NULL DEFAULT '0',
PRIMARY KEY ( `aid` )
) ENGINE = MYISAM DEFAULT CHARSET = utf8 AUTO_INCREMENT =1;

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 '`aid` int(11) NOT NULL auto_increment,
`mask` varchar(255) NOT NULL default ''' at line 1

How do I resolve this. Please provide very basic instructions as I am very new to both Drupal and mySQL.

Thanks

Jeff
posterns

Posts: 3
Joined: Mon Oct 26, 2009 10:25 am

Hi, Open the exported the

saurabhcms - November 11, 2009 - 07:43

Hi,

Open the exported the file using any editor/dreamweaver and copy only the database tables from top to bottom and the import it on the host and paste the same code there.

Thanks,
Saurabh Arya
www.cmswebsiteservices.com

Open exported file

posterns - November 14, 2009 - 16:21

Can you be a bit more specific. I can open the exported file in Text Wrangler, but what part am I actually copying and then what am I doing with it so that I can import it.

Jeff

You can contact me

saurabhcms - November 19, 2009 - 14:44

You can contact me personally.

Saurabh Arya | www.cmswebsiteservices.com | skype:nspl042

 
 

Drupal is a registered trademark of Dries Buytaert.