Database Restore

  • Anonymous - 2010-07-13

    Trying to restore database but it's creating an empty database. Here is the command:
    mysql -uusername -ppassword databasename < file.sql
    Also tried importing the .sql file using phpMyAdmin but it's still a blank database. Is there anything missing?
    Any help is appreciated.

  • Johannes Kolter

    Johannes Kolter - 2010-07-14

    1. Make sure the backup is not empty (tip from "basicprogrammer" in open discussion)
    2. If so, check the permissions of the MySQL account used for backup
    3. Start mysqldump manually with the option -log-error=name invoked, where name ist the full path to a logfile (e. g. ~/dump.log)

    You can also check syslog for mysql messages.

    It seems to be more an issue with mysql than automysqlbackup.

  • Zack Evans

    Zack Evans - 2010-08-26

    There's an option to include the database drop and create statements into the backup - CREATE_DATABASE.

    If this is set to "no" you might need to create the database (sometimes aka schema) before you can restore the dump into it.

    For troubleshooting try flipping whatever you have it set to now and see if you get a more helpful error.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks