Could you just use the mysql command like this?
mysql -u username -p database_name < file.sql
Yes, you can do that way and it's better and simpler but I wrote this article for who uses shared hosting or free hosting.
You even can't know when you need this. You may need this to help a friend or to do a client's job at a time you've never thought of.
Ah yeah, I hadn't thought of that. Nice article anyway!
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.