Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Mar 2003
    Posts
    427

    Default Large Mysql restore file - timeout

    Hi,

    how do I restore a mysql database from a backup file if the file is
    over 150 MB ? It just won't do it, it takes forever and then I get a
    error of some sort. I guess the file is to big but there must be another
    way doing this and not split the files upp in 50 pieces.

    Oh, I tried doing this in PHPMyadmin.
    Can I do it in SSH or something and if so how ?

    Error:
    Fatal error: Maximum execution time of 300 seconds exceeded in /usr/local/cpanel/base/3rdparty/phpMyAdmin/libraries/read_dump.lib.php on line 186


    Thanks guys !

    Regards Jerry

  2. #2
    Member
    Join Date
    Mar 2004
    Posts
    42

    Default

    Hey,

    It's pretty easy to restore a MySQL Database in ssh,

    just upload the SQL file to the server and run the following command in ssh:

    mysql -uUSERNAME -p newdbname < /path/to/dump.sql

    Replace the USERNAME, newdbname and the path/to/dump.sql to your own details
    it'll ask you for the database password and after filling that in it'll restore the db

    Good Luck,

    Ruud Goedhart

  3. #3
    Member
    Join Date
    Nov 2003
    Posts
    521

    Default

    there is no space between the -u and USERNAME .. is that a typo is that suppose to be like that?

    Also for the new database name do I need to create it as username_databasename.sql or username_databasename or just databasename

    Thank you in advance

  4. #4
    Member
    Join Date
    Mar 2002
    Posts
    295

    Default

    when doing restore from ssh you can make the db name whatever you want BUT if you want it to be accessible from a certain account you will want the accountname in the dbname

    No need to put .sql at the end

  5. #5
    Member
    Join Date
    Jun 2006
    Posts
    212

    Default

    Quote Originally Posted by jeroman8 View Post
    Hi,

    how do I restore a mysql database from a backup file if the file is
    over 150 MB ? It just won't do it, it takes forever and then I get a
    error of some sort. I guess the file is to big but there must be another
    way doing this and not split the files upp in 50 pieces.

    Oh, I tried doing this in PHPMyadmin.
    Can I do it in SSH or something and if so how ?

    Error:
    Fatal error: Maximum execution time of 300 seconds exceeded in /usr/local/cpanel/base/3rdparty/phpMyAdmin/libraries/read_dump.lib.php on line 186


    Thanks guys !

    Regards Jerry
    Was the mysql dump file compressed? phpMyAdmin should support gzip imports.
    Alex Villegas

Similar Threads & Tags
Similar threads

  1. Trying to restore large mySQL database
    By thehostrack in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 08-01-2007, 04:17 PM
  2. How do you restore database user manually from mysql.sql file?
    By JonathanLIVE in forum Database Discussions
    Replies: 1
    Last Post: 02-06-2006, 01:43 AM
  3. How do you restore database user manually from mysql.sql file?
    By JonathanLIVE in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 02-06-2006, 01:43 AM
  4. File too large
    By netarus in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 04-16-2005, 08:49 AM
  5. How to backup + restore large databases?
    By GaryW in forum cPanel and WHM Discussions
    Replies: 6
    Last Post: 03-03-2005, 09:50 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube