+ Reply to Thread
Results 1 to 5 of 5

Thread: Can't restore mysql database

  1. #1
    bhupendra2895's Avatar
    bhupendra2895 is offline x10 Elder bhupendra2895 is an unknown quantity at this point
    Join Date
    Jun 2010
    Location
    India
    Posts
    554

    Can't restore mysql database

    I recently installed ubuntu 10.10 on my system.Before doing this I backed up all mysql databases using phpmyadmin.Now after setting development environment in ubuntu 10.10 I can't restore databases.Because the backup.sql contains create procedure for information_schema.So whenever I try to restore databases I get the error 'root' don't have permission to access information_schema.So it results in restoration of databases above information_schema and all database below of it don't get restored.This backup.sql has size of 86 MB.So its tough to edit this file.Is there any way by which I can forcefully delete information_schema database?So I will be able to restore all the databases.

  2. #2
    gomarc's Avatar
    gomarc is offline x10 Elder gomarc is an unknown quantity at this point
    Join Date
    Oct 2007
    Location
    USA
    Posts
    511

    Re: Can't restore mysql database

    Hi bhupendra2895,

    This may work:

    Find these lines in your backup.sql

    Code:
    CREATE DATABASE `information_schema` ... ;
    USE `information_schema`;
    And change them to something like:

    Code:
    CREATE DATABASE `old_schema` . . . ;
    USE `old_schema`;
    After a successful restoration, you can drop old_schema database.

  3. #3
    bhupendra2895's Avatar
    bhupendra2895 is offline x10 Elder bhupendra2895 is an unknown quantity at this point
    Join Date
    Jun 2010
    Location
    India
    Posts
    554

    Re: Can't restore mysql database

    @Gomarc Thanks, what a brilliant idea, this will work definitely.

    But its too late now because I removed all queries related to information_schema from backup.sql file, it took half an hour.And I was able to restore my databases.But during this process I accidently dropped a database having name mysql and hence I can't see/create user privileges now.Really next time I will backup all databases individually or I will exclude information_schema from it.

    I guess database having name mysql will come back again if I will install mysql again on my system?
    Liked this? Click on the icon on the bottom of post to make me .

  4. #4
    gomarc's Avatar
    gomarc is offline x10 Elder gomarc is an unknown quantity at this point
    Join Date
    Oct 2007
    Location
    USA
    Posts
    511

    Re: Can't restore mysql database

    Yes, you should get mysql database back if you reinstall it and excluding the information_schema or renaming as indicated will help in future backups.

    Thanks for the +REP

  5. #5
    bhupendra2895's Avatar
    bhupendra2895 is offline x10 Elder bhupendra2895 is an unknown quantity at this point
    Join Date
    Jun 2010
    Location
    India
    Posts
    554

    Re: Can't restore mysql database

    Thanks, I got database having name mysql in backup file, all I need to do now is to press backspace or left mouse button for a very long time.
    Last edited by bhupendra2895; 10-16-2010 at 09:30 AM. Reason: I ate 'n' from thanks :D
    Liked this? Click on the icon on the bottom of post to make me .

+ Reply to Thread

Similar Threads

  1. database restore
    By cheezo in forum Free Hosting
    Replies: 1
    Last Post: 07-29-2010, 02:12 PM
  2. Restore Boru + Mysql DataBase + problem
    By thims in forum Free Hosting
    Replies: 1
    Last Post: 07-26-2010, 11:19 PM
  3. Lotus - Please Restore MYSQL database
    By usector in forum Free Hosting
    Replies: 13
    Last Post: 03-09-2009, 02:04 PM
  4. MySQL database dump and restore
    By Ant59 in forum Scripts & 3rd Party Apps
    Replies: 3
    Last Post: 10-20-2007, 07:10 AM
  5. I cant restore a mysql database
    By Revolution in forum Free Hosting
    Replies: 3
    Last Post: 07-24-2005, 01:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers