Centos 7 - Recover mysql db from data files .frm and .ibdHow to monitor the number of rows inserted per...

Trade a bishop in the opening

How can you tell apart the pronounciation at the end between the "meine" and "meiner" in the daily spoken situation?

How to balance combat for a duet campaign with non-frontliner classes?

What happens when the Immolation spell is cast on a creature immune to fire damage?

How does a ball bearing door hinge work?

What would be the effect of a giant magical fireball burning in the ocean?

How to figure out key from key signature?

How do I stop myself from always placing a monetary value on my time?

On notice period - coworker I need to train is giving me the silent treatment

Is it safe to pay bills over satellite internet?

Did Terry Pratchett ever explain the inspiration behind the Luggage?

Why are second inversion triads considered less consonant than first inversion triads?

How to prove that invoices are really unpaid?

Can a species eat water?

Encountering former, abusive advisor at a conference

Drawing a sequence of circles

What are the differences between prismatic, lensatic, and optical sighting compasses?

How should I understand FPGA architecture?

Digit Date Range

Does my protagonist need to be the most important character?

How many wires can safely be secured in a Marrette 33 wire nut?

In the twin paradox does the returning twin also come back permanently length contracted flatter than the twin on earth?

I need an automatic way of making a lot of numbered folders

How can I communicate feelings to players without impacting their agency?



Centos 7 - Recover mysql db from data files .frm and .ibd


How to monitor the number of rows inserted per second and per minute into MySQL dbHow to migrate MySQL and Apache data & settings, if a machine is not working but I can mount the old drive on a new one?export from MYSQL to CSVSharing MySQL data between Windows and Linux?MySQL Access Denied (CentOS)CentOS define same date and timezone for system and MySQLProblems with MySQL 5.7 and reset root password when use mysql_config_editorCentOS MySQL installMySQL dump, access denied 1045 with correct username and password






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{
margin-bottom:0;
}








1

















I have migrated my operating system from Windows to Centos 7 without getting backup of mysql through mysqldump. Now I have mysql data files .frm and .ibd . I want to migrate them



How can I migrate the database.










share|improve this question




















bumped to the homepage by Community 26 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.

















  • Please re-read the help→tour, especially the part about no distraction, no chit-chat. I already removed the superfluous parts from your post. Have a look at the edit history to see what you included that was inappropriate for this site. Appreciation is shown by voting on posts.

    – Anthon
    May 25 '15 at 6:02




















1

















I have migrated my operating system from Windows to Centos 7 without getting backup of mysql through mysqldump. Now I have mysql data files .frm and .ibd . I want to migrate them



How can I migrate the database.










share|improve this question




















bumped to the homepage by Community 26 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.

















  • Please re-read the help→tour, especially the part about no distraction, no chit-chat. I already removed the superfluous parts from your post. Have a look at the edit history to see what you included that was inappropriate for this site. Appreciation is shown by voting on posts.

    – Anthon
    May 25 '15 at 6:02
















1












1








1








I have migrated my operating system from Windows to Centos 7 without getting backup of mysql through mysqldump. Now I have mysql data files .frm and .ibd . I want to migrate them



How can I migrate the database.










share|improve this question

















I have migrated my operating system from Windows to Centos 7 without getting backup of mysql through mysqldump. Now I have mysql data files .frm and .ibd . I want to migrate them



How can I migrate the database.







centos mysql migration






share|improve this question
















share|improve this question













share|improve this question




share|improve this question








edited May 25 '15 at 6:00









Anthon

64.2k18 gold badges117 silver badges183 bronze badges




64.2k18 gold badges117 silver badges183 bronze badges










asked May 24 '15 at 22:03









G.MartingG.Marting

64 bronze badges




64 bronze badges






bumped to the homepage by Community 26 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.









bumped to the homepage by Community 26 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 26 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • Please re-read the help→tour, especially the part about no distraction, no chit-chat. I already removed the superfluous parts from your post. Have a look at the edit history to see what you included that was inappropriate for this site. Appreciation is shown by voting on posts.

    – Anthon
    May 25 '15 at 6:02





















  • Please re-read the help→tour, especially the part about no distraction, no chit-chat. I already removed the superfluous parts from your post. Have a look at the edit history to see what you included that was inappropriate for this site. Appreciation is shown by voting on posts.

    – Anthon
    May 25 '15 at 6:02



















Please re-read the help→tour, especially the part about no distraction, no chit-chat. I already removed the superfluous parts from your post. Have a look at the edit history to see what you included that was inappropriate for this site. Appreciation is shown by voting on posts.

– Anthon
May 25 '15 at 6:02







Please re-read the help→tour, especially the part about no distraction, no chit-chat. I already removed the superfluous parts from your post. Have a look at the edit history to see what you included that was inappropriate for this site. Appreciation is shown by voting on posts.

– Anthon
May 25 '15 at 6:02












2 Answers
2






active

oldest

votes


















0


















This is very much possible. This process I am going to explain is valid for a Ubuntu based system, but I hope there wouldn't be much differences for CentOS.



Essentially, you will need to copy your mysql data files to the /var/lib/mysql/ folder. Mysql data files are distributes inside this folder as:



.
|-- debian-5.5.flag
|-- ibdata1
|-- ib_logfile0
|-- ib_logfile1
|-- drupal
| |-- actions.frm
| |-- actions.MYD
| |-- actions.MYI
| |-- wysiwyg.frm
| |-- wysiwyg.MYD
| |-- wysiwyg.MYI
| |-- wysiwyg_user.frm
| |-- wysiwyg_user.MYD
| |-- wysiwyg_user.MYI
| |-- xmlsitemap.frm
| |-- xmlsitemap.MYD
| |-- xmlsitemap.MYI
| |-- xmlsitemap_sitemap.frm
| |-- xmlsitemap_sitemap.MYD
| `-- xmlsitemap_sitemap.MYI
|-- mysql
| |-- columns_priv.frm
| |-- columns_priv.MYD
| |-- columns_priv.MYI
| |-- db.frm
| |-- db.MYD
| |-- db.MYI
| |-- event.frm
| |-- event.MYD
| |-- event.MYI
| |-- func.frm
| |-- func.MYD
| |-- func.MYI
| |-- general_log.CSM
| |-- general_log.CSV
| |-- general_log.frm
| |-- help_category.frm
| |-- help_category.MYD
| |-- help_category.MYI
| |-- help_keyword.frm
| |-- help_keyword.MYD
| |-- help_keyword.MYI
| |-- procs_priv.MYI
| |-- proxies_priv.frm
| |-- proxies_priv.MYD
| |-- proxies_priv.MYI
| |-- servers.frm
| |-- servers.MYD
| |-- servers.MYI
| |-- slow_log.CSM
| |-- slow_log.CSV
| |-- slow_log.frm
| |-- tables_priv.frm
| |-- tables_priv.MYD
| |-- tables_priv.MYI
| |-- time_zone.frm
| |-- time_zone_leap_second.frm
| |-- time_zone_leap_second.MYD
| |-- time_zone_leap_second.MYI
| |-- time_zone.MYD
| |-- time_zone.MYI
| |-- time_zone_name.frm
| |-- time_zone_name.MYD
| |-- time_zone_name.MYI
| |-- time_zone_transition.frm
| |-- time_zone_transition.MYD
| |-- time_zone_transition.MYI
| |-- time_zone_transition_type.frm
| |-- time_zone_transition_type.MYD
| |-- time_zone_transition_type.MYI
| |-- user.frm
| |-- user.MYD
| `-- user.MYI
|-- mysql_upgrade_info
|-- performance_schema
| |-- cond_instances.frm
| |-- db.opt
| |-- events_waits_current.frm
| |-- events_waits_history.frm
| |-- events_waits_history_long.frm
| |-- events_waits_summary_by_instance.frm
| |-- events_waits_summary_by_thread_by_event_name.frm
| |-- events_waits_summary_global_by_event_name.frm
| |-- file_instances.frm
| |-- file_summary_by_event_name.frm
| |-- file_summary_by_instance.frm
| |-- mutex_instances.frm
| |-- performance_timers.frm
| |-- rwlock_instances.frm
| |-- setup_consumers.frm
| |-- setup_instruments.frm
| |-- setup_timers.frm
| `-- threads.frm
|-- phpmyadmin
| |-- db.opt
| |-- pma_bookmark.frm
| |-- pma_bookmark.MYD
| |-- pma_bookmark.MYI
| |-- pma_column_info.frm
| |-- pma_column_info.MYD
| |-- pma_column_info.MYI
| |-- pma_designer_coords.frm
| |-- pma_designer_coords.MYD
| |-- pma_designer_coords.MYI
| |-- pma_history.frm
| |-- pma_history.MYD
| |-- pma_history.MYI
| |-- pma_pdf_pages.frm
| |-- pma_pdf_pages.MYD
| |-- pma_pdf_pages.MYI
| |-- pma_recent.frm
| |-- pma_recent.MYD
| |-- pma_recent.MYI
| |-- pma_relation.frm
| |-- pma_relation.MYD
| |-- pma_relation.MYI
| |-- pma_table_coords.frm
| |-- pma_table_coords.MYD
| |-- pma_table_coords.MYI
| |-- pma_table_info.frm
| |-- pma_table_info.MYD
| |-- pma_table_info.MYI
| |-- pma_table_uiprefs.frm
| |-- pma_table_uiprefs.MYD
| |-- pma_table_uiprefs.MYI
| |-- pma_tracking.frm
| |-- pma_tracking.MYD
| |-- pma_tracking.MYI
| |-- pma_userconfig.frm
| |-- pma_userconfig.MYD
| `-- pma_userconfig.MYI


So, as you can see from the above trimmed output of tree command, data files are distributed inside sub-folders pertaining to each database. Most probably, your mysql database in windows-7 also distributed data in this form, so you just neeed to copy everything inside this folder.



After doing this, there is another key step. You will need to change the owner and group of all these files and folder to mysql. This is an important key step which I missed during migration once, and I had bang to my head till I figured it out. To do this, issue the command inside the /var/lib/mysql folder after copying files:



chown -R  mysql:mysql *





share|improve this answer


































    0


















    Yes, you are right but I don't have .MYI and .MYD files. After placing the required files and changing permissions, it shows the tables in phpmyadmin but while tying to open the tab



    Table doesn't exist


    Is it possible to generate .MYI and .MYD files






    share|improve this answer




























      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "106"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: false,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });















      draft saved

      draft discarded
















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f205405%2fcentos-7-recover-mysql-db-from-data-files-frm-and-ibd%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown


























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      0


















      This is very much possible. This process I am going to explain is valid for a Ubuntu based system, but I hope there wouldn't be much differences for CentOS.



      Essentially, you will need to copy your mysql data files to the /var/lib/mysql/ folder. Mysql data files are distributes inside this folder as:



      .
      |-- debian-5.5.flag
      |-- ibdata1
      |-- ib_logfile0
      |-- ib_logfile1
      |-- drupal
      | |-- actions.frm
      | |-- actions.MYD
      | |-- actions.MYI
      | |-- wysiwyg.frm
      | |-- wysiwyg.MYD
      | |-- wysiwyg.MYI
      | |-- wysiwyg_user.frm
      | |-- wysiwyg_user.MYD
      | |-- wysiwyg_user.MYI
      | |-- xmlsitemap.frm
      | |-- xmlsitemap.MYD
      | |-- xmlsitemap.MYI
      | |-- xmlsitemap_sitemap.frm
      | |-- xmlsitemap_sitemap.MYD
      | `-- xmlsitemap_sitemap.MYI
      |-- mysql
      | |-- columns_priv.frm
      | |-- columns_priv.MYD
      | |-- columns_priv.MYI
      | |-- db.frm
      | |-- db.MYD
      | |-- db.MYI
      | |-- event.frm
      | |-- event.MYD
      | |-- event.MYI
      | |-- func.frm
      | |-- func.MYD
      | |-- func.MYI
      | |-- general_log.CSM
      | |-- general_log.CSV
      | |-- general_log.frm
      | |-- help_category.frm
      | |-- help_category.MYD
      | |-- help_category.MYI
      | |-- help_keyword.frm
      | |-- help_keyword.MYD
      | |-- help_keyword.MYI
      | |-- procs_priv.MYI
      | |-- proxies_priv.frm
      | |-- proxies_priv.MYD
      | |-- proxies_priv.MYI
      | |-- servers.frm
      | |-- servers.MYD
      | |-- servers.MYI
      | |-- slow_log.CSM
      | |-- slow_log.CSV
      | |-- slow_log.frm
      | |-- tables_priv.frm
      | |-- tables_priv.MYD
      | |-- tables_priv.MYI
      | |-- time_zone.frm
      | |-- time_zone_leap_second.frm
      | |-- time_zone_leap_second.MYD
      | |-- time_zone_leap_second.MYI
      | |-- time_zone.MYD
      | |-- time_zone.MYI
      | |-- time_zone_name.frm
      | |-- time_zone_name.MYD
      | |-- time_zone_name.MYI
      | |-- time_zone_transition.frm
      | |-- time_zone_transition.MYD
      | |-- time_zone_transition.MYI
      | |-- time_zone_transition_type.frm
      | |-- time_zone_transition_type.MYD
      | |-- time_zone_transition_type.MYI
      | |-- user.frm
      | |-- user.MYD
      | `-- user.MYI
      |-- mysql_upgrade_info
      |-- performance_schema
      | |-- cond_instances.frm
      | |-- db.opt
      | |-- events_waits_current.frm
      | |-- events_waits_history.frm
      | |-- events_waits_history_long.frm
      | |-- events_waits_summary_by_instance.frm
      | |-- events_waits_summary_by_thread_by_event_name.frm
      | |-- events_waits_summary_global_by_event_name.frm
      | |-- file_instances.frm
      | |-- file_summary_by_event_name.frm
      | |-- file_summary_by_instance.frm
      | |-- mutex_instances.frm
      | |-- performance_timers.frm
      | |-- rwlock_instances.frm
      | |-- setup_consumers.frm
      | |-- setup_instruments.frm
      | |-- setup_timers.frm
      | `-- threads.frm
      |-- phpmyadmin
      | |-- db.opt
      | |-- pma_bookmark.frm
      | |-- pma_bookmark.MYD
      | |-- pma_bookmark.MYI
      | |-- pma_column_info.frm
      | |-- pma_column_info.MYD
      | |-- pma_column_info.MYI
      | |-- pma_designer_coords.frm
      | |-- pma_designer_coords.MYD
      | |-- pma_designer_coords.MYI
      | |-- pma_history.frm
      | |-- pma_history.MYD
      | |-- pma_history.MYI
      | |-- pma_pdf_pages.frm
      | |-- pma_pdf_pages.MYD
      | |-- pma_pdf_pages.MYI
      | |-- pma_recent.frm
      | |-- pma_recent.MYD
      | |-- pma_recent.MYI
      | |-- pma_relation.frm
      | |-- pma_relation.MYD
      | |-- pma_relation.MYI
      | |-- pma_table_coords.frm
      | |-- pma_table_coords.MYD
      | |-- pma_table_coords.MYI
      | |-- pma_table_info.frm
      | |-- pma_table_info.MYD
      | |-- pma_table_info.MYI
      | |-- pma_table_uiprefs.frm
      | |-- pma_table_uiprefs.MYD
      | |-- pma_table_uiprefs.MYI
      | |-- pma_tracking.frm
      | |-- pma_tracking.MYD
      | |-- pma_tracking.MYI
      | |-- pma_userconfig.frm
      | |-- pma_userconfig.MYD
      | `-- pma_userconfig.MYI


      So, as you can see from the above trimmed output of tree command, data files are distributed inside sub-folders pertaining to each database. Most probably, your mysql database in windows-7 also distributed data in this form, so you just neeed to copy everything inside this folder.



      After doing this, there is another key step. You will need to change the owner and group of all these files and folder to mysql. This is an important key step which I missed during migration once, and I had bang to my head till I figured it out. To do this, issue the command inside the /var/lib/mysql folder after copying files:



      chown -R  mysql:mysql *





      share|improve this answer































        0


















        This is very much possible. This process I am going to explain is valid for a Ubuntu based system, but I hope there wouldn't be much differences for CentOS.



        Essentially, you will need to copy your mysql data files to the /var/lib/mysql/ folder. Mysql data files are distributes inside this folder as:



        .
        |-- debian-5.5.flag
        |-- ibdata1
        |-- ib_logfile0
        |-- ib_logfile1
        |-- drupal
        | |-- actions.frm
        | |-- actions.MYD
        | |-- actions.MYI
        | |-- wysiwyg.frm
        | |-- wysiwyg.MYD
        | |-- wysiwyg.MYI
        | |-- wysiwyg_user.frm
        | |-- wysiwyg_user.MYD
        | |-- wysiwyg_user.MYI
        | |-- xmlsitemap.frm
        | |-- xmlsitemap.MYD
        | |-- xmlsitemap.MYI
        | |-- xmlsitemap_sitemap.frm
        | |-- xmlsitemap_sitemap.MYD
        | `-- xmlsitemap_sitemap.MYI
        |-- mysql
        | |-- columns_priv.frm
        | |-- columns_priv.MYD
        | |-- columns_priv.MYI
        | |-- db.frm
        | |-- db.MYD
        | |-- db.MYI
        | |-- event.frm
        | |-- event.MYD
        | |-- event.MYI
        | |-- func.frm
        | |-- func.MYD
        | |-- func.MYI
        | |-- general_log.CSM
        | |-- general_log.CSV
        | |-- general_log.frm
        | |-- help_category.frm
        | |-- help_category.MYD
        | |-- help_category.MYI
        | |-- help_keyword.frm
        | |-- help_keyword.MYD
        | |-- help_keyword.MYI
        | |-- procs_priv.MYI
        | |-- proxies_priv.frm
        | |-- proxies_priv.MYD
        | |-- proxies_priv.MYI
        | |-- servers.frm
        | |-- servers.MYD
        | |-- servers.MYI
        | |-- slow_log.CSM
        | |-- slow_log.CSV
        | |-- slow_log.frm
        | |-- tables_priv.frm
        | |-- tables_priv.MYD
        | |-- tables_priv.MYI
        | |-- time_zone.frm
        | |-- time_zone_leap_second.frm
        | |-- time_zone_leap_second.MYD
        | |-- time_zone_leap_second.MYI
        | |-- time_zone.MYD
        | |-- time_zone.MYI
        | |-- time_zone_name.frm
        | |-- time_zone_name.MYD
        | |-- time_zone_name.MYI
        | |-- time_zone_transition.frm
        | |-- time_zone_transition.MYD
        | |-- time_zone_transition.MYI
        | |-- time_zone_transition_type.frm
        | |-- time_zone_transition_type.MYD
        | |-- time_zone_transition_type.MYI
        | |-- user.frm
        | |-- user.MYD
        | `-- user.MYI
        |-- mysql_upgrade_info
        |-- performance_schema
        | |-- cond_instances.frm
        | |-- db.opt
        | |-- events_waits_current.frm
        | |-- events_waits_history.frm
        | |-- events_waits_history_long.frm
        | |-- events_waits_summary_by_instance.frm
        | |-- events_waits_summary_by_thread_by_event_name.frm
        | |-- events_waits_summary_global_by_event_name.frm
        | |-- file_instances.frm
        | |-- file_summary_by_event_name.frm
        | |-- file_summary_by_instance.frm
        | |-- mutex_instances.frm
        | |-- performance_timers.frm
        | |-- rwlock_instances.frm
        | |-- setup_consumers.frm
        | |-- setup_instruments.frm
        | |-- setup_timers.frm
        | `-- threads.frm
        |-- phpmyadmin
        | |-- db.opt
        | |-- pma_bookmark.frm
        | |-- pma_bookmark.MYD
        | |-- pma_bookmark.MYI
        | |-- pma_column_info.frm
        | |-- pma_column_info.MYD
        | |-- pma_column_info.MYI
        | |-- pma_designer_coords.frm
        | |-- pma_designer_coords.MYD
        | |-- pma_designer_coords.MYI
        | |-- pma_history.frm
        | |-- pma_history.MYD
        | |-- pma_history.MYI
        | |-- pma_pdf_pages.frm
        | |-- pma_pdf_pages.MYD
        | |-- pma_pdf_pages.MYI
        | |-- pma_recent.frm
        | |-- pma_recent.MYD
        | |-- pma_recent.MYI
        | |-- pma_relation.frm
        | |-- pma_relation.MYD
        | |-- pma_relation.MYI
        | |-- pma_table_coords.frm
        | |-- pma_table_coords.MYD
        | |-- pma_table_coords.MYI
        | |-- pma_table_info.frm
        | |-- pma_table_info.MYD
        | |-- pma_table_info.MYI
        | |-- pma_table_uiprefs.frm
        | |-- pma_table_uiprefs.MYD
        | |-- pma_table_uiprefs.MYI
        | |-- pma_tracking.frm
        | |-- pma_tracking.MYD
        | |-- pma_tracking.MYI
        | |-- pma_userconfig.frm
        | |-- pma_userconfig.MYD
        | `-- pma_userconfig.MYI


        So, as you can see from the above trimmed output of tree command, data files are distributed inside sub-folders pertaining to each database. Most probably, your mysql database in windows-7 also distributed data in this form, so you just neeed to copy everything inside this folder.



        After doing this, there is another key step. You will need to change the owner and group of all these files and folder to mysql. This is an important key step which I missed during migration once, and I had bang to my head till I figured it out. To do this, issue the command inside the /var/lib/mysql folder after copying files:



        chown -R  mysql:mysql *





        share|improve this answer





























          0














          0










          0









          This is very much possible. This process I am going to explain is valid for a Ubuntu based system, but I hope there wouldn't be much differences for CentOS.



          Essentially, you will need to copy your mysql data files to the /var/lib/mysql/ folder. Mysql data files are distributes inside this folder as:



          .
          |-- debian-5.5.flag
          |-- ibdata1
          |-- ib_logfile0
          |-- ib_logfile1
          |-- drupal
          | |-- actions.frm
          | |-- actions.MYD
          | |-- actions.MYI
          | |-- wysiwyg.frm
          | |-- wysiwyg.MYD
          | |-- wysiwyg.MYI
          | |-- wysiwyg_user.frm
          | |-- wysiwyg_user.MYD
          | |-- wysiwyg_user.MYI
          | |-- xmlsitemap.frm
          | |-- xmlsitemap.MYD
          | |-- xmlsitemap.MYI
          | |-- xmlsitemap_sitemap.frm
          | |-- xmlsitemap_sitemap.MYD
          | `-- xmlsitemap_sitemap.MYI
          |-- mysql
          | |-- columns_priv.frm
          | |-- columns_priv.MYD
          | |-- columns_priv.MYI
          | |-- db.frm
          | |-- db.MYD
          | |-- db.MYI
          | |-- event.frm
          | |-- event.MYD
          | |-- event.MYI
          | |-- func.frm
          | |-- func.MYD
          | |-- func.MYI
          | |-- general_log.CSM
          | |-- general_log.CSV
          | |-- general_log.frm
          | |-- help_category.frm
          | |-- help_category.MYD
          | |-- help_category.MYI
          | |-- help_keyword.frm
          | |-- help_keyword.MYD
          | |-- help_keyword.MYI
          | |-- procs_priv.MYI
          | |-- proxies_priv.frm
          | |-- proxies_priv.MYD
          | |-- proxies_priv.MYI
          | |-- servers.frm
          | |-- servers.MYD
          | |-- servers.MYI
          | |-- slow_log.CSM
          | |-- slow_log.CSV
          | |-- slow_log.frm
          | |-- tables_priv.frm
          | |-- tables_priv.MYD
          | |-- tables_priv.MYI
          | |-- time_zone.frm
          | |-- time_zone_leap_second.frm
          | |-- time_zone_leap_second.MYD
          | |-- time_zone_leap_second.MYI
          | |-- time_zone.MYD
          | |-- time_zone.MYI
          | |-- time_zone_name.frm
          | |-- time_zone_name.MYD
          | |-- time_zone_name.MYI
          | |-- time_zone_transition.frm
          | |-- time_zone_transition.MYD
          | |-- time_zone_transition.MYI
          | |-- time_zone_transition_type.frm
          | |-- time_zone_transition_type.MYD
          | |-- time_zone_transition_type.MYI
          | |-- user.frm
          | |-- user.MYD
          | `-- user.MYI
          |-- mysql_upgrade_info
          |-- performance_schema
          | |-- cond_instances.frm
          | |-- db.opt
          | |-- events_waits_current.frm
          | |-- events_waits_history.frm
          | |-- events_waits_history_long.frm
          | |-- events_waits_summary_by_instance.frm
          | |-- events_waits_summary_by_thread_by_event_name.frm
          | |-- events_waits_summary_global_by_event_name.frm
          | |-- file_instances.frm
          | |-- file_summary_by_event_name.frm
          | |-- file_summary_by_instance.frm
          | |-- mutex_instances.frm
          | |-- performance_timers.frm
          | |-- rwlock_instances.frm
          | |-- setup_consumers.frm
          | |-- setup_instruments.frm
          | |-- setup_timers.frm
          | `-- threads.frm
          |-- phpmyadmin
          | |-- db.opt
          | |-- pma_bookmark.frm
          | |-- pma_bookmark.MYD
          | |-- pma_bookmark.MYI
          | |-- pma_column_info.frm
          | |-- pma_column_info.MYD
          | |-- pma_column_info.MYI
          | |-- pma_designer_coords.frm
          | |-- pma_designer_coords.MYD
          | |-- pma_designer_coords.MYI
          | |-- pma_history.frm
          | |-- pma_history.MYD
          | |-- pma_history.MYI
          | |-- pma_pdf_pages.frm
          | |-- pma_pdf_pages.MYD
          | |-- pma_pdf_pages.MYI
          | |-- pma_recent.frm
          | |-- pma_recent.MYD
          | |-- pma_recent.MYI
          | |-- pma_relation.frm
          | |-- pma_relation.MYD
          | |-- pma_relation.MYI
          | |-- pma_table_coords.frm
          | |-- pma_table_coords.MYD
          | |-- pma_table_coords.MYI
          | |-- pma_table_info.frm
          | |-- pma_table_info.MYD
          | |-- pma_table_info.MYI
          | |-- pma_table_uiprefs.frm
          | |-- pma_table_uiprefs.MYD
          | |-- pma_table_uiprefs.MYI
          | |-- pma_tracking.frm
          | |-- pma_tracking.MYD
          | |-- pma_tracking.MYI
          | |-- pma_userconfig.frm
          | |-- pma_userconfig.MYD
          | `-- pma_userconfig.MYI


          So, as you can see from the above trimmed output of tree command, data files are distributed inside sub-folders pertaining to each database. Most probably, your mysql database in windows-7 also distributed data in this form, so you just neeed to copy everything inside this folder.



          After doing this, there is another key step. You will need to change the owner and group of all these files and folder to mysql. This is an important key step which I missed during migration once, and I had bang to my head till I figured it out. To do this, issue the command inside the /var/lib/mysql folder after copying files:



          chown -R  mysql:mysql *





          share|improve this answer














          This is very much possible. This process I am going to explain is valid for a Ubuntu based system, but I hope there wouldn't be much differences for CentOS.



          Essentially, you will need to copy your mysql data files to the /var/lib/mysql/ folder. Mysql data files are distributes inside this folder as:



          .
          |-- debian-5.5.flag
          |-- ibdata1
          |-- ib_logfile0
          |-- ib_logfile1
          |-- drupal
          | |-- actions.frm
          | |-- actions.MYD
          | |-- actions.MYI
          | |-- wysiwyg.frm
          | |-- wysiwyg.MYD
          | |-- wysiwyg.MYI
          | |-- wysiwyg_user.frm
          | |-- wysiwyg_user.MYD
          | |-- wysiwyg_user.MYI
          | |-- xmlsitemap.frm
          | |-- xmlsitemap.MYD
          | |-- xmlsitemap.MYI
          | |-- xmlsitemap_sitemap.frm
          | |-- xmlsitemap_sitemap.MYD
          | `-- xmlsitemap_sitemap.MYI
          |-- mysql
          | |-- columns_priv.frm
          | |-- columns_priv.MYD
          | |-- columns_priv.MYI
          | |-- db.frm
          | |-- db.MYD
          | |-- db.MYI
          | |-- event.frm
          | |-- event.MYD
          | |-- event.MYI
          | |-- func.frm
          | |-- func.MYD
          | |-- func.MYI
          | |-- general_log.CSM
          | |-- general_log.CSV
          | |-- general_log.frm
          | |-- help_category.frm
          | |-- help_category.MYD
          | |-- help_category.MYI
          | |-- help_keyword.frm
          | |-- help_keyword.MYD
          | |-- help_keyword.MYI
          | |-- procs_priv.MYI
          | |-- proxies_priv.frm
          | |-- proxies_priv.MYD
          | |-- proxies_priv.MYI
          | |-- servers.frm
          | |-- servers.MYD
          | |-- servers.MYI
          | |-- slow_log.CSM
          | |-- slow_log.CSV
          | |-- slow_log.frm
          | |-- tables_priv.frm
          | |-- tables_priv.MYD
          | |-- tables_priv.MYI
          | |-- time_zone.frm
          | |-- time_zone_leap_second.frm
          | |-- time_zone_leap_second.MYD
          | |-- time_zone_leap_second.MYI
          | |-- time_zone.MYD
          | |-- time_zone.MYI
          | |-- time_zone_name.frm
          | |-- time_zone_name.MYD
          | |-- time_zone_name.MYI
          | |-- time_zone_transition.frm
          | |-- time_zone_transition.MYD
          | |-- time_zone_transition.MYI
          | |-- time_zone_transition_type.frm
          | |-- time_zone_transition_type.MYD
          | |-- time_zone_transition_type.MYI
          | |-- user.frm
          | |-- user.MYD
          | `-- user.MYI
          |-- mysql_upgrade_info
          |-- performance_schema
          | |-- cond_instances.frm
          | |-- db.opt
          | |-- events_waits_current.frm
          | |-- events_waits_history.frm
          | |-- events_waits_history_long.frm
          | |-- events_waits_summary_by_instance.frm
          | |-- events_waits_summary_by_thread_by_event_name.frm
          | |-- events_waits_summary_global_by_event_name.frm
          | |-- file_instances.frm
          | |-- file_summary_by_event_name.frm
          | |-- file_summary_by_instance.frm
          | |-- mutex_instances.frm
          | |-- performance_timers.frm
          | |-- rwlock_instances.frm
          | |-- setup_consumers.frm
          | |-- setup_instruments.frm
          | |-- setup_timers.frm
          | `-- threads.frm
          |-- phpmyadmin
          | |-- db.opt
          | |-- pma_bookmark.frm
          | |-- pma_bookmark.MYD
          | |-- pma_bookmark.MYI
          | |-- pma_column_info.frm
          | |-- pma_column_info.MYD
          | |-- pma_column_info.MYI
          | |-- pma_designer_coords.frm
          | |-- pma_designer_coords.MYD
          | |-- pma_designer_coords.MYI
          | |-- pma_history.frm
          | |-- pma_history.MYD
          | |-- pma_history.MYI
          | |-- pma_pdf_pages.frm
          | |-- pma_pdf_pages.MYD
          | |-- pma_pdf_pages.MYI
          | |-- pma_recent.frm
          | |-- pma_recent.MYD
          | |-- pma_recent.MYI
          | |-- pma_relation.frm
          | |-- pma_relation.MYD
          | |-- pma_relation.MYI
          | |-- pma_table_coords.frm
          | |-- pma_table_coords.MYD
          | |-- pma_table_coords.MYI
          | |-- pma_table_info.frm
          | |-- pma_table_info.MYD
          | |-- pma_table_info.MYI
          | |-- pma_table_uiprefs.frm
          | |-- pma_table_uiprefs.MYD
          | |-- pma_table_uiprefs.MYI
          | |-- pma_tracking.frm
          | |-- pma_tracking.MYD
          | |-- pma_tracking.MYI
          | |-- pma_userconfig.frm
          | |-- pma_userconfig.MYD
          | `-- pma_userconfig.MYI


          So, as you can see from the above trimmed output of tree command, data files are distributed inside sub-folders pertaining to each database. Most probably, your mysql database in windows-7 also distributed data in this form, so you just neeed to copy everything inside this folder.



          After doing this, there is another key step. You will need to change the owner and group of all these files and folder to mysql. This is an important key step which I missed during migration once, and I had bang to my head till I figured it out. To do this, issue the command inside the /var/lib/mysql folder after copying files:



          chown -R  mysql:mysql *






          share|improve this answer













          share|improve this answer




          share|improve this answer










          answered May 25 '15 at 0:35









          shivamsshivams

          3,0762 gold badges14 silver badges30 bronze badges




          3,0762 gold badges14 silver badges30 bronze badges




























              0


















              Yes, you are right but I don't have .MYI and .MYD files. After placing the required files and changing permissions, it shows the tables in phpmyadmin but while tying to open the tab



              Table doesn't exist


              Is it possible to generate .MYI and .MYD files






              share|improve this answer































                0


















                Yes, you are right but I don't have .MYI and .MYD files. After placing the required files and changing permissions, it shows the tables in phpmyadmin but while tying to open the tab



                Table doesn't exist


                Is it possible to generate .MYI and .MYD files






                share|improve this answer





























                  0














                  0










                  0









                  Yes, you are right but I don't have .MYI and .MYD files. After placing the required files and changing permissions, it shows the tables in phpmyadmin but while tying to open the tab



                  Table doesn't exist


                  Is it possible to generate .MYI and .MYD files






                  share|improve this answer














                  Yes, you are right but I don't have .MYI and .MYD files. After placing the required files and changing permissions, it shows the tables in phpmyadmin but while tying to open the tab



                  Table doesn't exist


                  Is it possible to generate .MYI and .MYD files







                  share|improve this answer













                  share|improve this answer




                  share|improve this answer










                  answered May 25 '15 at 19:49









                  G.MartingG.Marting

                  64 bronze badges




                  64 bronze badges


































                      draft saved

                      draft discarded



















































                      Thanks for contributing an answer to Unix & Linux Stack Exchange!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f205405%2fcentos-7-recover-mysql-db-from-data-files-frm-and-ibd%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown









                      Popular posts from this blog

                      Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

                      Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

                      Ciclooctatetraenă Vezi și | Bibliografie | Meniu de navigare637866text4148569-500570979m