Useful Snippets

Welcome!


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

Are your smart devices spying on you? Make better purchasing choices and find products that respect your privacy at Unwanted.cloud

RSS Latest posts from my personal blog


Most viewed posts


Subscribe to RSS feed


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.