0

I have a .sql file (db) which I am trying to import using myphpadmin and keep getting a time out error. The file is 46.6 MB (zipped)

Please note I am not on XAMPP but using a Godaddy myphpAdmin platform to manage the database.

What I've tried:

  1. Re-downloaded the file as a zip file - and tried importing it. Still failed.

  2. For this option given in phpmyadmin import, I tried UNSELECTING this option > "Allow the interruption of an import in case the script detects it is close to the PHP timeout limit. (This might be a good way to import large files, however it can break transactions.)"....and I also tried importing the db keeping it selected, but this failed. Which should it be?

What else can I do?

6
  • 1
    Maybe split mysql file and then import multiple files instead of one big file. Commented Nov 22, 2021 at 14:32
  • 1
    There are ways to change timeout settings. Ask your hosting vendor support about that. And be aware that the provider you mentioned doesn't support a lot of that kind of customization. Your best bet is to split your SQL files into chunks and load them one by one. Commented Nov 22, 2021 at 14:42
  • I know I can do this - but surely 46.6 isn't even big??! Commented Nov 22, 2021 at 14:52
  • by chunks, do you mean download each table.....it just doesn't seem correct that myphpadmin would be so clunky and not allow something so basic - for so small a file size Commented Nov 22, 2021 at 14:52
  • It's problem with phpMyAdmin on Godaddy and I'm quite sure that you can't use command line like ssh to import via command line. If that case, there are few choice to do. 1. split MySQL file and 2. contact hosting vendor (Godaddy for your case) to get help with this. Commented Nov 22, 2021 at 15:31

2 Answers 2

4

nothing worked, except SSH.

What you need: Database (that you are importing into) username and password Cpanel username and password + IP address (for Putty)

  1. I had to upload the .sql file to a folder on the public_html.

  2. Download pUtty

  3. In putty I needed the IP address (hosting server) as well as the cpanel username and password (so have that handy).

  4. Once in, you have to enter your cpanel's password

  5. Use the "cd" change directory command to change directory to where you have placed your .sql file.

  6. Once there, use the following command:

    mysql -p -u user_name database_name < file.sql*

(Note: replace 'user_name', 'database_name', and 'file.sql' with the actual name.)**

You will be prompted for your database password, and then your database will be imported.

Useful link: https://www.siteground.co.uk/kb/exportimport-mysql-database-via-ssh/

Sign up to request clarification or add additional context in comments.

Comments

1

You can try unzipping the file locally and importing the uncompressed .sql file; the overhead of uncompressing the file in memory could be the problem for phpMyAdmin. Generally, though, what Shadow said is correct and you should use some other means for import (like the command-line client). You could also use the phpMyAdmin UploadDir feature to put the file on the file in a special folder that phpMyAdmin can directly access on the server. This can help with a lot of the resource limits the webserver imposes.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.