Showing posts with label DataBases. Show all posts
Showing posts with label DataBases. Show all posts

Thursday, August 13, 2020

Installation MySQL Database 5.7.31. in Ubuntu 18.04 - Mithun Technologies - 9980923226

 

Mithun Technologies            +91-9980923226              devopstrainingblr@gmail.com

                                                       http://mithuntechnologies.com/
                                                       http://mithuntechnologies.co.in/ 
 
MySQL Database Installation  in Ubuntu

#Login as a root user
sudo su -


#Update the system packages.
apt-get update -y


#Check mysql packges in the server.

 apt-cache search mysql

#Install the mysql packages.

apt-get install mysql-server mysql-client  -y

#Check the status of mysql service
systemctl status mysql

#Enable the mysql service
systemctl enable mysql

#Check the which version of MySQL server installed using below command.
mysqld --version

#Check the which version of client utility installed using below command.
mysqladmin -V

#MySQL database server configuration file is availabe in /etc/mysql/mysql.conf.d directory.
See the configurations..
less /etc/mysql/mysql.conf.d/mysqld.cnf

#
mysql_secure_installation

#Connect to mysql server
mysql -u root -p

#Check the MySQL server version
SELECT VERSION();

SHOW VARIABLES LIKE "%version%";

#Using below command we can see how long the MySQL server has been running.
STATUS;
(OR)
mysqladmin version

#To Display database.
show databases;

Wednesday, February 19, 2020

Mongo DB Installation - Linux - Mithun Technologies - 9980923226



Mithun Technologies            +91-9980923226              devopstrainingblr@gmail.com

                                                       http://mithuntechnologies.com/
                                                       http://mithuntechnologies.co.in/ 
Mongo DB Installation 
#Login as a root user
sudo su -

#Configure the package management system (yum).
#Create a file /etc/yum.repos.d/mongodb-org-4.2.repo


vi /etc/yum.repos.d/mongodb-enterprise-4.2.repo

#add below lines in /etc/yum.repos.d/mongodb-org-4.2.repo file

[mongodb-enterprise-4.2]
name=MongoDB Enterprise Repository
baseurl=https://repo.mongodb.com/yum/redhat/$releasever/mongodb-enterprise/4.2/$basearch/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.2.asc

#Install the mongodb
yum install -y mongodb-enterprise

#Enable the mongod service
systemctl enable mongod
#Start  the mongod service
systemctl start mongod
#Check the mongo db version
mongo --version

#Connect to mongo db
mongo
#Create a user

use admin
 
db.createUser(
  {
    user: "mithuntechnologies",
    pwd: "passw0rd",
    roles: [ { role: "userAdminAnyDatabase", db: "admin" } ]
  }
)

#Enable authentication

vi /etc/mongod.conf

security:
    authorization: "enabled"
   
#Restart the mongod service as follows.

service mongod restart

# Connect to Mongo DB from any client
mongo mongod:IPAddress:27017


Ansible Installation in Amazon Linux - Mithun Technologies - 9980923226

  Mithun Technologies            +91-9980923226              devopstrainingblr@gmail.com                                                 ...