How to import large sql files into MySQL using the command line

--

Every time I need to import a large sql file inside my local database I get this error “You probably tried to upload a file that is too large. Please refer to documentation for a workaround for this limit.”.

PHPMyAdmin error: “You probably tried to upload a file that is too large. Please refer to documentation for a workaround for this limit.

One solution is to use the command line but, as usual, I forget the right command to execute. Here is why I’m publishing this, here, now…

mysql -h yourhostname -u username -p databasename < yoursqlfile.sql

To remember.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Responses (3)

Write a response