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 6907195
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:24:18+00:00 2026-05-27T08:24:18+00:00

I have a mysql database with data. I want to change the database table

  • 0

I have a mysql database with data. I want to change the database table structure.(to add some new columns to some tables, add new tables).Keeping the data in the database, this can be done and it is ok. But I want to export data to the new modified database from earlier database.That means,I have the structure of the database without data and I change the tables and add new tables to the database.Then I want to export data (which was in earlier database) to the new modified database.Here, one by one tables can be exported.But if there are more tables and more columns,how can I accomplish this in one pc and one mysql server?

  • 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-05-27T08:24:19+00:00Added an answer on May 27, 2026 at 8:24 am

    If you use mysqldump and omit the DDL statements (-t option) as well as use complete inserts (-c option), you should be able to take the old table’s data and insert it into the new table without trouble.

    However, this does assume that you’re NOT changing the names/types of any of the tables/fields, and are simply adding new+different fields. If you’re changing table names and/or field names, then you’re better off importing the dump into a separate temporary database and doing an insert ... select from type query where you can specify the new field mappings.


    $ mysqldump -p -t -c name_of_db table1 table2 table3 ... > dump.sql
    $ mysql -p name_of_other_db < dump.sql
    

    -p = prompt for password (might need -u for username if your mysql username doesn’t match your system login’s username)
    -t = skip table creation
    -c = use complete inserts

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

Sidebar

Related Questions

I have data in an MYSQL database that looks like this: Project Date Time
I have mysql database structure like below: CREATE TABLE test ( id int(11) NOT
I have basically MySQL dump from a WordPress database with some data. The whole
I retrieve data from a mysql database. I want to make this data available
I have a mysql database set as utf-8, and csv data set as utf-8,
I have a script that automatically populates a mysql database with data every hour.
I have data in a MySQL database. I am sending the user a URL
We have a system that has a Mysql database with about 2Gigs of data.
In my SQL Server database schema I have a data table with a date
I have mysql database and I want a software which can draw the database

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.