The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

mySQL restore timing out

Discussion in 'General Discussion' started by apc1, May 15, 2005.

  1. apc1

    apc1 Well-Known Member

    Joined:
    Oct 18, 2004
    Messages:
    123
    Likes Received:
    0
    Trophy Points:
    16
    Hello,

    I need to restore a mySQL database of about 350MB that was backed up through cPanel, but it always times-out after 30 minutes or so.

    How can I restore the mySQL database?

    Is the cPanel mySQL database format the same as the mySQL dump format?

    Thank you very much!
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Yes, it's all just MySQL.

    You're probably better off either:

    1. Restoring it through phpmyadmin and providing a zip file instead of the text sql file

    or

    2. Load it from shell (if you don't have shell access ask your host to do it for you)
     
  3. apc1

    apc1 Well-Known Member

    Joined:
    Oct 18, 2004
    Messages:
    123
    Likes Received:
    0
    Trophy Points:
    16
    Hello,

    Thank you very much indeed for your reply.

    The file is currently in ".gz" format. If I uncompress it it does not have a ".sql" extension.

    Is this file still compatible with mySQL dumep and restore format?

    I did use PHPmyAdmin but that times out as well.

    I don't have shell access myself, but again, is the uncompressed file, without the ".sql" extension loadable from the shell into mySQL?

    Thanks very much once again.

    Best regards.
     
  4. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Yes, it should be, so long as it's a text file you can use the mysql command from shell to import it straight into the database of your choice using:

    mysql -u username -p password database < filename
     
  5. apc1

    apc1 Well-Known Member

    Joined:
    Oct 18, 2004
    Messages:
    123
    Likes Received:
    0
    Trophy Points:
    16
    Thanks very much indeed. I will ask the host if they will do this for me.

    I looked at PHPmyAdmin again and it has a 50MB limit on the upload file.

    Best regards.
     
  6. apc1

    apc1 Well-Known Member

    Joined:
    Oct 18, 2004
    Messages:
    123
    Likes Received:
    0
    Trophy Points:
    16
    With regards to the above command, is it necessary to add the account name before the user name as appears in cPanel, e.g.

    account_username -p password account_database filename

    or can the "account_" be left out of the statement?

    Thanks once again and regards!
     
  7. anup123

    anup123 Well-Known Member

    Joined:
    Mar 29, 2004
    Messages:
    897
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    This Planet
    I used phpmyadmin once without success. Doing it from ssh is best. I am not sure if cPanel's backup adds --add-drop-table to exports. I do a manual backup also with the above added as another option to fallback to in case cpanel's restore fails.

    Thanks
    Anup
     
  8. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    This should be included. "account_username" is the exact mysql username whereas "username" is not. The same applies to database names.
     
  9. apc1

    apc1 Well-Known Member

    Joined:
    Oct 18, 2004
    Messages:
    123
    Likes Received:
    0
    Trophy Points:
    16
    Hi,

    I am now doing this mysql command, but I am unsure which password to use; it says the password is invalid.

    Is it the password on the database; which is the one I am using, or is it the main mysql password or another one?

    Thank you very much.

    Best regards.
     
Loading...

Share This Page