Careless Fingers
Machine-translated (anthropic, claude-haiku-5-5) from the Chinese original. Read the original in 中文
Today, while deploying the studio website, I deleted our Git database. Luckily there was a backup, or I'd have been dragged out and sacrificed to the gods. mmp
Let me walk through the details so that my classmates don't make the same mistake.
First, because of the VPS's mysterious security mechanism, the SQL database could only be accessed locally, meaning no remote access. That was pretty awkward. I figured the problem was from when it was installed, and that reinstalling it would fix everything, ojbk.
Easier said than done (in the style of an elementary school essay).
1.sudo apt-get autoremove --purge mysql-server
2.sudo apt-get remove mysql-common
So far there's nothing wrong, it's the next step that's the problem:
3.dpkg -l |grep ^rc|awk '{print $2}' |sudo xargs dpkg -P
Clearing the leftover data. Wow, that's when I got screwed: I deleted everything that belonged to the original database. I was left speechless. Consider this post a reminder for everyone, and always remember to back up your data~ mmp
Comments