DB Error: Constraint Violation (After Overwriting Files in Horde)

Posted on 2009-02-12
Last Modified: 2013-12-02
My host suggested I copy and the files that contained my old data from the old directory:

To the new files in the new directory:

I overwrite these without making a backup and now I need help.

When I overwrote mnemo_memos.MYD I could still add notes via Horde webmail. Then, I overwrote mnemo_memos.MYI and mnemo_memos.frm and I get the following error when I try to add a note in Horde:
There was an error saving the note: DB Error: constraint violation

Can someone please help me just to get this working again. It would be a plus if I could also get my old data saved, too. Thank you.
Question by:EMB01
    LVL 20

    Accepted Solution


    Looks to me like you copied over the MySQL database while the database was active. Try this:

    # Turn OFF the MySQL database server
    /etc/init.d/mysqld stop
    # Copy the old databases again
    cp /old/var/lib/mysql/horde/mnemo_memos* /var/lib/mysql/horde/
    # Restart the MySQL database server
    /etc/init.d/mysqld start

    I hope this helps!

    LVL 14

    Author Closing Comment

    Dude, you're the man! I didn't know I had to shut mysqld off first and the host must not have know either (or they just didn't care to say...). Thanks, man! Now, I've got all my old notes and can add new ones.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
    Email attacks are the most efficient and effective way for cyber criminals and hackers to compromise a computer or network. We often find our-self second guessing the authenticity of an email message, for such instances we can follow practical princ…
    Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
    To show how to generate a certificate request in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Servers >> Certificates…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now