How To Install MySql In centos7/RHEL7

How To Install MySql In centos7_RHEL7 (1)

SHORT INTRODUCTION

MySQL is a free and open source database management system commonly used in web applications to store and retrieve records and information.

Step 1: Update your system:

$ sudo yum update

Step 2: You will need wget to complete this guide. It can be installed as follows:

$ sudo yum install wget

Install MySQL

  1. Download and add the repository, then update.

wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
$ sudo rpm -ivh mysql-community-release-el7-5.noarch.rpm
$ sudo yum update

Step 3 : install mysql and start the service

$ sudo yum install mysql-server
$ sudo systemctl start mysqld

MySQL will bind to localhost (127.0.0.1) by default.

Run the mysql_secure_installation script to address several security concerns in a default MySQL installation.

$sudo mysql_secure_installation

Root Login 

  1. To log in to MySQL as the root user:

  2. mysql -u root -p

  1. You’ll then be presented with a welcome header and the MySQL prompt as shown below:

mysql>

Tags:

No responses yet

Leave a Reply

Your email address will not be published. Required fields are marked *

Latest Comments

No comments to show.