Self-Hosting Fail!

Self-Hosting Fail!
Photo by Jerry Zhang / Unsplash

Not a lot of posting, well any, in the last couple of months. A mixture of
being ill, studying, and mountain bike trips has left me with either very
little motivation or time.

I thought I should post something. I went to log in to the Ghost admin page
and got an error basically saying "failure to send email." After a couple of
attempts, I noticed a spelling mistake in the email address saved in my
password manager. Doh! Then it dawned on me: I had set up my login with an
email that doesn't exist and I'm the only user. Hmmm, no one to call for
help...

After some digging online, I realized that since I'm self-hosting, I have
all the control. It should be an easy fix!

Here's how I solved it:

First, I used docker exec to get a shell inside my MariaDB database
container for the blog.

docker exec -it "Container-Name" mariadb -u "Username" -p

Now I'm in the shell I need to load the database USE ghost_blog then I ran this command to update the email address for my account.

UPDATE users SET email = 'Correct_Email' WHERE email = 'Wrong_Email';

Then, I checked to ensure my user was active and the correct email
address was showing for my account.

SELECT id, name, email, status FROM users;
Full address hidden obvs ;)

Excellent! My email is now correct, and I'm back in glad that is over password managers are fantastic, but they're only as good as the data you put into them. A tiny typo can lead to a major headache.

Anyway, with the digital keys back in my possession, I'm hoping to get back
to more regular posting. I've got plenty of stories from the trails and
study notes to share. Stay tuned!