Database war
Mysql & Mongodb
Installation

Database war Mysql & Mongodb Installation

Carlos Rivas's photo
Carlos Rivas

Published on Feb 22, 2021

3 min read

Hey my friends, a new post about this war, but with different characters. I don't know which is better, but I'll try to figure it out. I hope y'all enjoy this series. Here we go!

This time I'm going to talk about how install two databases MYSQL and Mongodb

Mysql

It's important to update the repositories.

sudo apt update

This command is to install the server

sudo apt install mysql-server

Selection_444.png

This command you can check if MYSQL is running

sudo systemctl status mysql

Selection_448.png

MongoDB

Maybe you get an outdated version from the repositories, then you can use this command to get the last version.

curl -fsSL https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -

Selection_446.png

This command is to add and to create a file in this path /etc/apt/sources.list.d

echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list

Selection_447.png

It's important to update the repositories.

sudo apt update

This command is to install the server

sudo apt install mongodb-org

Selection_449.png

The last command doesn't run the daemon, then you need run this command

sudo systemctl start mongod.service

This command you can check if MongoDB is running

sudo systemctl status mongod

Selection_450.png

Conclusion

This is our first view about two databases.

  • MYSQL is easier to install, but because the MongoDB is outdated in the repositories.

Would you like to see new things about databases?

I hope you enjoy my post and remember that I am just a Dev like you!

 
Share this