Useful Snippets

Useful Snippets


This blog is used to collect useful snippets related to Linux, PHP, MySQL and more. Feel free to post comments with improvements or questions!

July 2020
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728293031  

Categories


Import zipped mysql dumps

Stanislav KhromovStanislav Khromov
unzip -p dbdump.sql.zip | mysql -u root -p dbname

Note
-p flag pipes the output.
Make sure the zip file contains only a single sql file.
Make sure to change dbname to the name of your database on the MySQL server.

unzip manpage

Web Developer at Aftonbladet (Schibsted Media Group)
Any opinions on this blog are my own and do not reflect the views of my employer.
LinkedIn
Twitter
WordPress.org Profile
Visit my other blog

Comments 2
  • Konka
    Posted on

    Konka Konka

    Reply Author

    Bro Any possibility of importing zipped XLSV files to DB and to extract data from zipped XLSV files.


    • Stanislav Khromov
      Posted on

      Stanislav Khromov Stanislav Khromov

      Reply Author

      That’s a whole different beast. You’d have to find a command line utility that can perform XLSV -> SQL conversion.