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

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.
LVL 14
Who is Participating?
Daniel McAllisterPresident, IT4SOHO, LLCCommented:

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!

EMB01Author Commented:
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.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.