Hi All,
I reinstalled xampp and and also install the drupal 7 into it.
I wanted to use my backup (.mysqlfile).But when try to import this file in drupal database using phpmyadmin it shows

CREATE TABLE `accesslog` ( `aid` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Primary Key: Unique accesslog ID.', `sid` varchar(128) NOT NULL DEFAULT '' COMMENT 'Browser session ID of user that visited page.', `title` varchar(255) DEFAULT NULL COMMENT 'Title of page visited.', `path` varchar(255) DEFAULT NULL COMMENT 'Internal path to page visited (relative to Drupal root.)', `url` text COMMENT 'Referrer URI.', `hostname` varchar(128) DEFAULT NULL COMMENT 'Hostname of user that visited the page.', `uid` int(10) unsigned DEFAULT '0' COMMENT 'User users.uid that visited the page.', `timer` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Time in milliseconds that the page took to load.', `timestamp` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Timestamp of when the page was visited.', PRIMARY KEY (`aid`), KEY `accesslog_timestamp` (`timestamp`), KEY `uid` (`uid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Stores site access information for statistics.' AUTO_INCREM[...]

MySQL said:

#1050 - Table '`drupal`.`accesslog`' already exists

when I login into localhost/drupal
it shows following error.
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'drupal.semaphore' doesn't exist: SELECT expire, value FROM {semaphore} WHERE name = :name; Array ( [:name] => variable_init ) in lock_may_be_available() (line 167 of C:\xampp\htdocs\drupal\includes\lock.inc)...

Please let me knoe exact way to use the back file.

Thank you
Gyan.

Comments

john_b’s picture

If you are restoring a backup you usually need to empty the database, and possibly delete all tables first.

Best take a new backup before doing this, in case the file you are restoring from is corrupt.

Digit Professionals specialising in Drupal, WordPress & CiviCRM support for publishers in non-profit and related sectors

jeffdiecks’s picture

moving forward you may also want to look into installing the Backup and Migrate module to help make tasks like this easier in Drupal:
http://drupal.org/project/backup_migrate