Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8201977
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T07:00:15+00:00 2026-06-07T07:00:15+00:00

I am trying to import zipped database files into Mysql using command prompt using

  • 0

I am trying to import zipped database files into Mysql using command prompt using the following command

7z < backup.sql.7z | mysql -u root test

The root user don’t have any password associated with it.
test is my target blank database.
I use 7zip for unzipping purpose.
The zipped database i.e. backup.sql.7z is located in D drive.

But it’s giving the following error
enter image description here

So, instead I used the following command

7z < backup.7z | mysql -u root test

Note: This time I am using backup.7z instead of backup.sql.7z

But then I get the following error
enter image description here

Clearly there’s something wrong with my SQL syntax.

What will be the correct syntax to use then ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T07:00:17+00:00Added an answer on June 7, 2026 at 7:00 am

    I needed to import from a compressed file as well, and stumbled upon your question.
    After a bit of messing around, I found that this worked for me:

    7z x -so backup.7z | mysql -u root test
    

    x is the extraction command
    -so makes 7-zip write to stdout

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When trying to import my SVN repo in Git, using the following command: git
I am trying to import a CSV file into a MySQL 5.1 database. The
I am trying to import wordpress content into liferay 6.1 using the wordpress importer
I am trying to import a txt/csv file into my postgres database from php
I am trying to import users into AD using a CSV file, PowerShell, and
I am trying to import Scalala into Eclipse. I had tried using the sbt-eclipse
I am trying to import RSA private keys into the keychain using my application.
I am trying to import an access database to mysql. I have created a
I'm trying to import one of the GWT samples into Eclipse by following the
I'm trying import CSV file to Arraylist using StringTokenizer : public class Test {

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.