Tables missing from MySQL database after removing then restoring the mysql data direcory

I have trouble understanding this fallacy: "If A, then B. Therefore if not-B, then not-A."

Find the smallest value of the function

Am I correct in stating that the study of topology is purely theoretical?

Count repetitions of an array

Taking headphones when quitting job

Does it take energy to move something in a circle?

Non-Cancer terminal illness that can affect young (age 10-13) girls?

How to not let the Identify spell spoil everything?

"Starve to death" Vs. "Starve to the point of death"

Boss asked me to sign a resignation paper without a date on it along with my new contract

Plausible reason for gold-digging ant

Is there a way to store 9th-level spells in a Glyph of Warding or similar method?

Why is it that Bernie Sanders is always called a "socialist"?

Does the US government have any planning in place to ensure there's no shortages of food, fuel, steel and other commodities?

Prevent Nautilus / Nemo from creating .Trash-1000 folder in mounted devices

Are the positive and negative planes inner or outer planes in the Great Wheel cosmology model?

What is the difference between "...", '...', $'...', and $"..." quotes?

Not a Long-Winded Riddle

Will rerolling initiative each round stop meta-gaming about initiative?

A fantasy book with seven white haired women on the cover

Cat is tipping over bed-side lamps during the night

Broad Strokes - missing letter riddle

What species should be used for storage of human minds?

Eww, those bytes are gross



Tables missing from MySQL database after removing then restoring the mysql data direcory














0















I Carried out the following operations.



make mysqldump of testdb



# Stop service
/etc/init.d/mysql stop
# Create copy of directory
cd /var/lib
cp -R mysql mysql.backup
# Delete datafile on disk
rm -rf mysql/testdb
# Start service
/etc/init.d/mysql start


At this stage I was going to import testdb again from the mysqldump however we wanted to roll back for an unrelated reason so I restored the mysql file



/etc/init.d/mysql stop
rm -rf mysql/
cp -R mysql.backup mysql
# Restore ownership and permissions
chown -R mysql:mysql mysql
chmod -R 700 mysql


At this point testdb shows up if I run show databases; and it shows tables but doesn't appear to contain data any more.



Is this recoverable or am I wasting my time? I have the option of refreshing the db from prod









share







New contributor




Simon Merrick is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

























    0















    I Carried out the following operations.



    make mysqldump of testdb



    # Stop service
    /etc/init.d/mysql stop
    # Create copy of directory
    cd /var/lib
    cp -R mysql mysql.backup
    # Delete datafile on disk
    rm -rf mysql/testdb
    # Start service
    /etc/init.d/mysql start


    At this stage I was going to import testdb again from the mysqldump however we wanted to roll back for an unrelated reason so I restored the mysql file



    /etc/init.d/mysql stop
    rm -rf mysql/
    cp -R mysql.backup mysql
    # Restore ownership and permissions
    chown -R mysql:mysql mysql
    chmod -R 700 mysql


    At this point testdb shows up if I run show databases; and it shows tables but doesn't appear to contain data any more.



    Is this recoverable or am I wasting my time? I have the option of refreshing the db from prod









    share







    New contributor




    Simon Merrick is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      0












      0








      0








      I Carried out the following operations.



      make mysqldump of testdb



      # Stop service
      /etc/init.d/mysql stop
      # Create copy of directory
      cd /var/lib
      cp -R mysql mysql.backup
      # Delete datafile on disk
      rm -rf mysql/testdb
      # Start service
      /etc/init.d/mysql start


      At this stage I was going to import testdb again from the mysqldump however we wanted to roll back for an unrelated reason so I restored the mysql file



      /etc/init.d/mysql stop
      rm -rf mysql/
      cp -R mysql.backup mysql
      # Restore ownership and permissions
      chown -R mysql:mysql mysql
      chmod -R 700 mysql


      At this point testdb shows up if I run show databases; and it shows tables but doesn't appear to contain data any more.



      Is this recoverable or am I wasting my time? I have the option of refreshing the db from prod









      share







      New contributor




      Simon Merrick is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      I Carried out the following operations.



      make mysqldump of testdb



      # Stop service
      /etc/init.d/mysql stop
      # Create copy of directory
      cd /var/lib
      cp -R mysql mysql.backup
      # Delete datafile on disk
      rm -rf mysql/testdb
      # Start service
      /etc/init.d/mysql start


      At this stage I was going to import testdb again from the mysqldump however we wanted to roll back for an unrelated reason so I restored the mysql file



      /etc/init.d/mysql stop
      rm -rf mysql/
      cp -R mysql.backup mysql
      # Restore ownership and permissions
      chown -R mysql:mysql mysql
      chmod -R 700 mysql


      At this point testdb shows up if I run show databases; and it shows tables but doesn't appear to contain data any more.



      Is this recoverable or am I wasting my time? I have the option of refreshing the db from prod







      mysql linux mysql-5.7 recovery





      share







      New contributor




      Simon Merrick is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.










      share







      New contributor




      Simon Merrick is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      share



      share






      New contributor




      Simon Merrick is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 1 min ago









      Simon MerrickSimon Merrick

      101




      101




      New contributor




      Simon Merrick is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      Simon Merrick is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      Simon Merrick is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          0






          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "182"
          };
          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/3.0/"u003ecc by-sa 3.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
          });


          }
          });






          Simon Merrick is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f230724%2ftables-missing-from-mysql-database-after-removing-then-restoring-the-mysql-data%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          Simon Merrick is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          Simon Merrick is a new contributor. Be nice, and check out our Code of Conduct.













          Simon Merrick is a new contributor. Be nice, and check out our Code of Conduct.












          Simon Merrick is a new contributor. Be nice, and check out our Code of Conduct.
















          Thanks for contributing an answer to Database Administrators 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%2fdba.stackexchange.com%2fquestions%2f230724%2ftables-missing-from-mysql-database-after-removing-then-restoring-the-mysql-data%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

          Szabolcs (Ungheria) Altri progetti | Menu di navigazione48°10′14.56″N 21°29′33.14″E /...

          Discografia di Klaus Schulze Indice Album in studio | Album dal vivo | Singoli | Antologie | Colonne...

          How to make inet_server_addr() return localhost in spite of ::1/128RETURN NEXT in Postgres FunctionConnect to...