How to avoid timeout when importing a lot of data?

For avoid timeout best option is wp-cli.
Wp-cli is wordpress command line interface. you can export/import data using wp-cli.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)