And sometimes it will not successfully be imported because of huge data that might cause execution timeout.
One way to overcome this problem is by using the drush command tool. See more Top 5 Drush commands
Here are the steps on importing drupal database:
- Copy and paste the sql file inside of docroot folder or web folder .This must be inline of index.php file
- Use the windows console or terminal for mac and navigate the directory of where the sql file is located.
NOTE. remote server will also apply as long as there is drush command installed
3. Type drush sql-connect for version 8 , drush sql:connect for version 9
4. Copy and paste mysql --user=[usernanme] --password=[password] --host=[server_host] --port=[port_number] the result . This command will be connected to your database server.
5. Type >source [filename].sql
Once import is done , run drush cr for clear cache and youre database is now updated
Note : Database import can also apply for fresh install drupal . You need to install first the drupal then once installation was succesfull , run the import database which is given steps above