Results 1 to 7 of 7
  1. #1
    Join Date
    Oct 2003
    Location
    Hanoi
    Posts
    4,306

    error when restore mysql

    I have a new customer moving from another host. His account was terminated already, so just have backup file. When restoring his mysql database, I have this error

    Unable to restore database dbname.sql to agesuke_forum : ERROR at line 521 in file: '/backup/dbname.sql': Unknown command '\0'.
    Googling shows error in version < 5.0.6 but we are using 5.1.35 already. Is there any idea to fix? This account will run on CentOS 5 - 64bits, FYI.

    Thanks.

  2. #2
    Hello,

    The error seems to be due to mysql 4.

    The backup of mysql 4 cannot be restored in mysql 5.

    Thank you.

  3. #3
    Join Date
    Oct 2003
    Location
    Hanoi
    Posts
    4,306
    No, the old server runs mysql 5 already.

  4. #4
    have you checked what is in line 521 of /backup/dbname.sql ?
    what does the line looks like?
    HalfDedi.com Half Dedicated Half Price
    We provide affordable VPS hosting solution Singapore datacenter

  5. #5
    Join Date
    May 2009
    Location
    SLASH ROOT
    Posts
    853

  6. #6
    Join Date
    Oct 2003
    Location
    Hanoi
    Posts
    4,306
    Quote Originally Posted by markhard View Post
    have you checked what is in line 521 of /backup/dbname.sql ?
    what does the line looks like?
    Nothing wrong at that line I believe. Line 521 is the second line in the below quote.

    DROP TABLE IF EXISTS `attachmentpermission`;
    /*!40101 SET @saved_cs_client = @@character_set_client */;
    /*!40101 SET character_set_client = utf8 */;
    CREATE TABLE `attachmentpermission` (
    `attachmentpermissionid` int(10) unsigned NOT NULL AUTO_INCREMENT,
    `extension` varchar(20) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT $
    `usergroupid` int(10) unsigned NOT NULL DEFAULT '0',
    `size` int(10) unsigned NOT NULL DEFAULT '0',
    `width` smallint(5) unsigned NOT NULL DEFAULT '0',
    `height` smallint(5) unsigned NOT NULL DEFAULT '0',
    `attachmentpermissions` int(10) unsigned NOT NULL DEFAULT '0',
    PRIMARY KEY (`attachmentpermissionid`),
    UNIQUE KEY `extension` (`extension`,`usergroupid`),
    KEY `usergroupid` (`usergroupid`)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
    /*!40101 SET character_set_client = @saved_cs_client */;
    Quote Originally Posted by whrss View Post
    If it is a version incompatibility, you will see the related errors.
    May I know the size of the DB you are trying to restore?
    Not too big. The .sql file is 109MB

  7. #7
    Join Date
    May 2009
    Location
    SLASH ROOT
    Posts
    853

Similar Threads

  1. MySQL Error : Got error -1 from storage engine Error Number : 1030
    By Linkdatacenter in forum Programming Discussion
    Replies: 2
    Last Post: 05-25-2008, 04:16 AM
  2. How to restore mysql databases from /var/lib/mysql/user_database/ files only?
    By bjdea1 in forum Hosting Security and Technology
    Replies: 2
    Last Post: 02-11-2008, 05:44 AM
  3. During WHM restore of an account backup get error: "Failed to restore the domain"
    By tnedator in forum Hosting Software and Control Panels
    Replies: 0
    Last Post: 10-20-2007, 12:33 AM
  4. restore mysql error
    By UnrealSilence in forum Hosting Security and Technology
    Replies: 1
    Last Post: 02-27-2006, 08:38 AM
  5. [account restore error]: username is taken
    By zmontano69 in forum Hosting Security and Technology
    Replies: 7
    Last Post: 01-18-2004, 07:17 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •