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


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

Full-stack impostor syndrome sufferer & Software Engineer at Schibsted Media Group

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.