Announcement

Announcement Module
Collapse
No announcement yet.

Database gone, tables empty | alter ignore add unique | truncate

Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Database gone, tables empty | alter ignore add unique | truncate

    Hello,

    i accidentaly "emptied" a table with approx 360 entries.

    After adding "chatname varchar(30)", i executed "alter ignore add unique(chatname)" on the "users" table, resulting only 1 row left.

    After this i got a bit angry, and truncated all tables in the database :S

    Is there any way this database can be recovered? This database is innodb. What tool should i use?


    Also i am having some difficulties compiling the percona tools. I use "./configure" inside mysql-source/, then i do a "make" 1 directory below, and get the error "/usr/bin/ld: cannot find -lrt"

    > Above problem is solved, -lrt on centos is provided by "yum install glibc-static"

    The 1 percone tool i did manage to use gave me an error like "does not support point"

    Regards Webbie
    Last edited by webbie; 01-24-2014, 12:37 PM. Reason: solved "make"

  • #2
    There is no way to recover data once deleted from database and hence from disk, backup is best strategy before doing any alter or major schema change.

    Comment


    • #3
      Hi,

      If your server is still started and data is being written to the database then it might be happen that the deleted records are overwritten. But still you can try with this tool. http://www.percona.com/software/mysq...recovery-tools

      Comment


      • #4
        that is great tool indeed and i need to test it how it can help in production environment. i think it works in same manner as disk recovery tool where data should not be overwritten or disk inodes should not be updated.

        Comment

        Working...
        X