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

  • Home
  • SEARCH
  • 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 8057345
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T09:00:06+00:00 2026-06-05T09:00:06+00:00

I want to insert a sql.gz file into my database with SSH. What should

  • 0

I want to insert a sql.gz file into my database with SSH. What should I do?

For example I have a database from telephone numbers that name is numbers.sql.gz, what is this type of file and how can I import this file into my database?

  • 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-05T09:00:09+00:00Added an answer on June 5, 2026 at 9:00 am

    The file is a gzipped (compressed) SQL file, almost certainly a plain text file with .sql as its extension. The first thing you need to do is copy the file to your database server via scp.. I think PuTTY’s is pscp.exe

    # Copy it to the server via pscp
    C:\> pscp.exe numbers.sql.gz user@serverhostname:/home/user
    

    Then SSH into your server and uncompress the file with gunzip

    user@serverhostname$  gunzip numbers.sql.gz
    user@serverhostname$  ls 
    
    numbers.sql
    

    Finally, import it into your MySQL database using the < input redirection operator:

    user@serverhostname$  mysql -u mysqluser -p < numbers.sql
    

    If the numbers.sql file doesn’t create a database but expects one to be present already, you will need to include the database in the command as well:

    user@serverhostname$  mysql -u mysqluser -p databasename < numbers.sql
    

    If you have the ability to connect directly to your MySQL server from outside, then you could use a local MySQL client instead of having to copy and SSH. In that case, you would just need a utility that can decompress .gz files on Windows. I believe 7zip does so, or you can obtain the gzip/gunzip binaries for Windows.

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

Sidebar

Related Questions

I exported some data from my database table into sql file as insert statements.
I have managed to insert the whole text-file data in SQL-SERVER database table with
Long story short, I have a SQL file that I want to import as
I want to import data from Excel worksheet into SQL Server database (2008). I
I have file with multiple SQL statements in it to be executed. INSERT INTO
I want to insert data from an .sql file to my table in SQL.
I want to insert a row into the Database using SqlDataAdapter. I've 2 tables
in a web application, i want to insert the XML file content into an
I have an SQL-File which i need to modify before importing it into the
I want to bulk insert about 700 records into the Android database on my

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.