Peace be with you, in the Holy Name of Christ our Lord Jesus.

Good morning, my dear friends. How are you?
Friends, before we go about doing our tasks for today. First, let us kneel down in prayer. Prayer helps, my brothers and sisters.

Let us devote some quiet time for prayer. 🙏
Taimtim tayong manalangin, aking mga kapatid.
Matapos manalangin, tayo mag-umpisa sa ating task, at gawain.
We have this task from folks at Kode Kloud. With their Kode Kloud engineer hands-on learning program.
If you also want to sign-up for it. You can, also. My friend, it is free of charge. Every body can sign up for it too.
Point your web browser to this address: https://engineer.kodekloud.com
Sign-up with your valid and working email address. And you should be good to go.
If I remember it correctly, you don’t need a credit card for you to learn off their hands-on program.
However…
For their learning lectures inside the academy. You’ll need to pay a subscription cost, correlating with the kind of plan you’ll choose from their selection. Alright, folks?
Okay, let’s get started for today’s task.
We have MariaDB. Or… for lack of it, according to our task, it is down and unavailable for one of our applications. Without it, our app will not work at all.
So, we need to bring it back up again, and online.
Yes, sounds like a plan.
Here’s the details.
There is a critical issue going on with the
Nautilus
application inStratos DC
. The production support team identified that the application is unable to connect to the database. After digging into the issue, the team found that mariadb service is down on the database server.Look into the issue and fix the same.
Oh, one more thing, in case you’re wondering about it. Nautilus is a web application from a fictitious tech start-up or company that Kode Kloud has set-up for us to train from, as “on the job” trainees with their Kode Kloud engineer program.
And, 100 Days of DevOps, what we’re trying to do, or to become a part of presently, is part of that learning program. It’s good that they made it free and available to all folk.
God bless them.
First off, my friends I’m writing this weblog of learnings (and mistakes) so that I could find and hopefully land a job.
For our task at hand, we need reference into the infrastructure of our Kode Kloud engineer ecosystem.
This means, we need to know what server machines are available to us. And if possible, how to access what we need to help do our task.
We’re looking for the server where the MariaDB (Maria Database) is installed, configured, and where it’s suppose to run to serve our web application (called “Nautilus”).
Here is the infrastructure details, according to Kode Kloud’s website.

Okay.
Friends. According to this, the database server is at the hostname called “stdb01”.
It could be the Linux instance that hosts our Maria DB service. We’ll need to check it out, my friends.
We need to log into our database server.
ssh peter@stdb01
We enter the database server password. That you can find from the infrastructure table above.
Okay. We’re able to log in to our database server. That’s good.
Alright.
Wait. Hang on, my friends. I’ll grab my mug of coffee, and take a sip of coffee – for some coffee goodness. ☕

I hope you’re also able to have some coffee from where you are, my brothers and sisters.
Folks, I need the caffeine in the morning.
Thanks for being around with me.
We input this Linux command, to check if MariaDB is on our database server.
sudo systemctl status mariadb
According to the print out, the software MariaDB is installed inside our database server.
However, it is currently stopped and disabled.

When we attempt to start mariaDB. We can’t.
sudo systemctl start mariadb

We’ll need to find out what’s going on, my friends.
And work with what looks like a dependency. To fulfill it, so that we can hopefully get mariaDB started as a service.
Folks, a dependency is something we call a software, or a service that we need to be installed, or running first – before we can add or install an additional software, or service. It needs to come first, in a way of saying.
Like you need to have some coffee beans first, before you can brew coffee.
Hmm…
My brothers and sisters, it seems I made a mistake here.
Hang on, let’s trace our steps. And try to learn from our mistakes. We pick up the lessons, okay my friends?
From our database server. We can enable mariaDB, with a system utility called “systemctl”.
sudo systemctl enable mariadb
However, we can’t start mariaDB for an unknown reason.
sudo systemctl start mariadb
We’ll need to dig deeper, my brothers and sisters.
This Linux command above, if it works, should resolve our database server.

This error stream or error message points us where we need to look. For our troubleshooting.
We need to look at the “systemctl status” and “journalctl”.
These are services that manage and look after Linux processes. Processes is another name we call software that runs to provide a service to an instance, or computer for this matter.
Let me look into this one for a while, my friends. And I’ll get back to you if I find anything worth the while to share. Sorry.
Friends, I found this link from the trace of the error logs.
https://mariadb.com/kb/en/library/systemd
It might be helpful. For it looks like the web documentation of mariaDB.
Let’s take a look.
Here’s what we know so far.
- We’re able to login to our database server (yay!! :D)
- We have mariaDB installed (also, yay!! XD)
- However, we can’t start mariaDB, but we can enable it (hmmmmm…. 🤔🤔🤔🤔🤔)
Nothing yet.
I’m at my wits end! 😆
But we must keep trying.
We’ll learn something new this way. Okay, friends?

So my brothers and sisters, we’ve found the config file for mariaDB.
Thanks to their documentation online. Kudos to their folks.

However, for some another unknown reason, we can’t modify or even create a config file that Linux can read and implement.
Sorry, I’ll have to keep working on it.
We’re almost out of time. We have a time-limit for our task.
I’ll re-do the task later on, my friends.
Our task is not yet a failure. I believe it is a failure if we full give up.
My friends, for now let us re-group and re-convene later on, to tackle this task of troubleshooting (or fixing a broken, or faulty component from mariaDB implementation).
Again, thanks for being around with me.
God bless us, one and all. 🙌
Okay, folks.
Sorry.
I just had breakfast. And now having a bowl of cookies and some coffee.

Me trying to read mariaDB’s web documentation.

To find something helpful.
While also, trying to ask for some help online. Asking around, I found one that has the same lab exercise.
I’ll implement later what I learn off of these, okay folks?
Peace be with you all.
Okay, folks.
I’m done with eating some cookies off of a bowl. And my coffee’s gone now too.
Don’t worry my friends, I’m also now trying to watch my caffeine intake along with sugar intake too.
We’re getting old.
Alright…
According to someone from Burma. As the person whose tutorials I found online is speaking in Burmese. Thanks to him for that.
In order to get our mariaDB started. We need to do two things first. And that’s to:
- Check if “/var/lib/mysql” exists, if it exists it needs to be empty.
- I didn’t know this before, sorry folks, I’m not an expert either with databases.
sudo rm -frdv /var/lib/mysql
If the folder, or directory isn’t empty. Force Linux to remove all pre-existing files and folders inside the directory.

Otherwise, starting mariaDB will fail again.
sudo mkdir /var/lib/mysql
Then, re-create a fresh folder/directory without any content inside. With the “mkdir” Linux command.

- Then you need to change owners with a Linux command. “chown” to enable mariaDB service to access and utilize the directory at /var/lib/mysql
- This is my personal understanding of what I found.
sudo chown -R mysql:mysql /var/lib/mysql
Folks, you can find the same tutorial (note that the language is in Burmese). Here: https://youtu.be/K1XCIpp6Ts4
Credits to brother developer from Burma, for the YouTube tutorial.
Don’t forget to start the mariaDB service.
sudo systemctl start mariadb

Check the service status to verify if mariaDB has properly started.
sudo systemctl status mariadb

Thanks, and I think that’s it for now, my brothers and sisters.
God bless!
‘Til next time.
Kapayapaan nawa’y suma-inyo at suma-ating lahat, mga kapanalig at mga kaibigan.