0% found this document useful (0 votes)
21 views4 pages

Mysql Installation Steps-Final

The document outlines the steps to install MySQL, secure the MySQL installation, and remove the anonymous user. It also provides the steps to install MongoDB, start the MongoDB daemon, enable it to start on boot, and stop/restart the daemon. Sample commands are shown to connect to MySQL and MongoDB and perform basic operations.

Uploaded by

Ravikiran Holkar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views4 pages

Mysql Installation Steps-Final

The document outlines the steps to install MySQL, secure the MySQL installation, and remove the anonymous user. It also provides the steps to install MongoDB, start the MongoDB daemon, enable it to start on boot, and stop/restart the daemon. Sample commands are shown to connect to MySQL and MongoDB and perform basic operations.

Uploaded by

Ravikiran Holkar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

[ccoew@localhost ~]$ su

Password[root@localhost ~]# yum install java

[root@localhost ~]# yum install eclipse

MySql Installation Steps


[root@localhost init.d]# dnf install http://dev.mysql.com/get/mysql80-community-release-fc27-
1.noarch.rpm

[root@localhost init.d]# dnf install mysql-community-server

[root@localhost init.d]# dnf --disablerepo=mysql80-community --enablerepo=mysql57-community


install mysql-community-server

[root@localhost init.d]# systemctl start mysqld.service

[root@localhost init.d]# systemctl enable mysqld.service

grep 'A temporary password is generated for root@localhost' /var/log/mysqld.log |tail -1

This is the out put of above command so this temporary password should be
entered first then set Mysql Password as Comp@sl3
2018-07-02T03:57:04.382117Z 5 [Note] [MY-010454] [Server] A temporary password
is generated for root@localhost: L_F=d#KjG2Of

[root@localhost init.d]# /usr/bin/mysql_secure_installation

Securing the MySQL server deployment.

Enter password for user root:


The existing password for the user account root has expired. Please set a new password.

New password:

Re-enter new password:


... Failed! Error: Your password does not satisfy the current policy requirements
New password:

Re-enter new password:

VALIDATE PASSWORD PLUGIN can be used to test passwords and improve security. It checks the
strength of password and allows the users to set only those passwords which are
secure enough. Would you like to setup VALIDATE PASSWORD plugin?

Press y|Y for Yes, any other key for No: y

There are three levels of password validation policy:


Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 1
Using existing password for root.

Estimated strength of the password: 100


Change the password for root ? ((Press y|Y for Yes, any other key for No) : y

New password:

Re-enter new password:

Estimated strength of the password: 100


Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : y
By default, a MySQL installation has an anonymous user,
allowing anyone to log into MySQL without having to have
a user account created for them. This is intended only for
testing, and to make the installation go a bit smoother.
You should remove them before moving into a production
environment.

Remove anonymous users? (Press y|Y for Yes, any other key for No) : y
Success.

Normally, root should only be allowed to connect from


'localhost'. This ensures that someone cannot guess at
the root password from the network.

Disallow root login remotely? (Press y|Y for Yes, any other key for No) : y
Success.

By default, MySQL comes with a database named 'test' that


anyone can access. This is also intended only for testing,
and should be removed before moving into a production
environment.

Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y
- Dropping test database...
Success.

- Removing privileges on test database...


Success.

Reloading the privilege tables will ensure that all changes


made so far will take effect immediately.

Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y
Success.

All done!
[root@localhost init.d]# mysql -h localhost -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 17
Server version: 8.0.11 MySQL Community Server - GPL
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its


affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

Installation steps of MongoDB


sudo yum install mongodb mongodb-server

sudo service mongod start

chkconfig mongod on

service mongod stop

service mongod restart

ccoew@localhost ~]$ mongo

MongoDB shell version v3.4.11


connecting to: mongodb://127.0.0.1:27017
MongoDB server version: 3.4.11
Welcome to the MongoDB shell.
For interactive help, type "help".
For more comprehensive documentation, see
http://docs.mongodb.org/
Questions? Try the support group
http://groups.google.com/group/mongodb-user
Server has startup warnings:
2018-07-01T23:33:17.379-0400 I STORAGE [initandlisten]
2018-07-01T23:33:17.379-0400 I STORAGE [initandlisten] ** WARNING: Using the XFS
filesystem is strongly recommended with the WiredTiger storage engine
2018-07-01T23:33:17.379-0400 I STORAGE [initandlisten] ** See
http://dochub.mongodb.org/core/prodnotes-filesystem
2018-07-01T23:33:18.035-0400 I CONTROL [initandlisten]
2018-07-01T23:33:18.035-0400 I CONTROL [initandlisten] ** WARNING: Access control is not
enabled for the database.
2018-07-01T23:33:18.035-0400 I CONTROL [initandlisten] ** Read and write access to data
and configuration is unrestricted.
2018-07-01T23:33:18.035-0400 I CONTROL [initandlisten]
2018-07-01T23:33:18.035-0400 I CONTROL [initandlisten]
2018-07-01T23:33:18.035-0400 I CONTROL [initandlisten] ** WARNING: soft rlimits too low.
rlimits set to 30477 processes, 64000 files. Number of processes should be at least 32000 : 0.5 times
number of files.
> use db
switched to db db
> db.stud.insert({name: "Jyoti",age:16})
WriteResult({ "nInserted" : 1 })
> db.stud.find()
{ "_id" : ObjectId("5b39ea19c3dd0478da6faa23"), "name" : "Jyoti", "age" : 16 }
>

You might also like