DEV Community

Cover image for PHPMyAdmin import database timeout | Import SQL using command line/Terminal
Arman Rahman
Arman Rahman

Posted on

PHPMyAdmin import database timeout | Import SQL using command line/Terminal

This problem might happen if the database is really big or if the internet connection is slow.

Just so you know, PHPMyAdmin doesn't pay attention to the timeout or memory settings in cPanel. It gets its rules from the regular timeout on the server, which is set in WHM.

Sometime it can happen on your local pc. so you can follow this steps-

Attention: If a particular cPanel doesn't come with a Terminal, then this won't work on it.

  1. If we have shell/terminal access, we log in to the cpanel user account and run or in your local pc:
mysql -u username -p
Enter fullscreen mode Exit fullscreen mode

Note: If you are using localhost use root on username

In the prompt we enter the password then run the command:

Note: If you are using localhost then just hit enter only. [by default localhost do not have password. if you set any password then use that.]

Then enter your database:

mysql> use database_name;
Enter fullscreen mode Exit fullscreen mode

Then we import the database sql with the correct path:

source /our/path/to/backup.sql;
Enter fullscreen mode Exit fullscreen mode

Top comments (0)