Quantcast
Channel: BitNami Answers - latest questions
Viewing all articles
Browse latest Browse all 2052

Bitnami Redmine - Database Restore - Error 1064 (42000)

$
0
0

Hi all,

I am testing the backup and restore features which come with BitNami Redmine 2.0.3-1 for Windows. All seems to work well, including the backup of the database using the following code:

mysqldump -u root -p bitnami_redmine > redmine_backup.sql

No errors are generated by the BitNami Redmine Stack Environment console when this backup is created. I then attempt to restore this database on another machine using the following code:

mysql -u root -p bitnami_redmine < redmine_backup.sql

When I do this the BitNami Redmine Stack Environment console returns the following error message:

"ERROR 1064 (42000) at line 1504: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax etc etc...

By looking at the .SQL file in question it appears that the final line of code (which I believe it should be) "-- Dump completed on yyyy-MM-dd hh:mm:ss", actually appears in the middle of the script, with additional SQL code appearing after it. This code is a duplicate of what already appears before "-- Dump completed on yyyy-MM-dd hh:mm:ss" in the script, such as this (a short sample copied directly from the .SQL file):

-- Dump completed on 2012-09-13 15:08:01
,(7,2,'Issue',1,'','2012-09-13 09:33:08'),(8,7,'Issue',1,'','2012-09-13 09:33:53');
/*!40000 ALTER TABLE `journals` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `member_roles`
--

DROP TABLE IF EXISTS `member_roles`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `member_roles` (
  `id` int(11) NOT NULL auto_increment,
  `member_id` int(11) NOT NULL,
  `role_id` int(11) NOT NULL,
  `inherited_from` int(11) default NULL,
  PRIMARY KEY  (`id`),
  KEY `index_member_roles_on_member_id` (`member_id`),
  KEY `index_member_roles_on_role_id` (`role_id`)
) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

My primary concerns at this point are:

  1. Why is this happening?
  2. How can this be fixed?
  3. If a fix is found now, what happens when the Redmine database size increases? will this problem return?

I used the same mysqldump code mentioned above on another machine. I checked the .SQL file and it appeared to generate correctly, with "-- Dump completed on yyyy-MM-dd hh:mm:ss" appearing as the last line of code in the script.

Thanks for your assistance in advance,

X22


Viewing all articles
Browse latest Browse all 2052

Latest Images

Trending Articles



Latest Images