How to Install MySQL latest version 5.7.12 in CentOS
Installation of MySQL latest version 5.7.12 in CentOS 7.2
MySQL is a relational database management system (RDBMS) that runs as a server providing multi-user access to a number of databases. In this tutorial we will discuss how to install mysql latest version 5.7.12 in CentOS 7.2.
MySQL repository installation
First Download the MySQL repository by using the following command.
[root@linuxhelp ~]# wget http://dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpm
--2016-05-24 13:08:47-- http://dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpm
Resolving dev.mysql.com (dev.mysql.com)... 137.254.60.11
Connecting to dev.mysql.com (dev.mysql.com)|137.254.60.11|:80... connected.
.
.
.
Saving to: ‘ mysql57-community-release-el7-7.noarch.rpm’
100%[====================================================> ] 8,984 16.5KB/s in 0.5s
2016-05-24 13:08:54 (16.5 KB/s) - ‘ mysql57-community-release-el7-7.noarch.rpm’ saved [8984/8984]
After downloading the package, install the package by using the following command.
[root@linuxhelp ~]# yum localinstall mysql57-community-release-el7-7.noarch.rpm
Loaded plugins: fastestmirror, langpacks
Examining mysql57-community-release-el7-7.noarch.rpm: mysql57-community-release-el7-7.noarch
Marking mysql57-community-release-el7-7.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package mysql57-community-release.noarch 0:el7-7 will be installed
--> Finished Dependency Resolution
.
.
.
Running transaction
Installing : mysql57-community-release-el7-7.noarch 1/1
Verifying : mysql57-community-release-el7-7.noarch 1/1
Installed:
mysql57-community-release.noarch 0:el7-7
Complete!
Now verify the MySQL repository successfully added into repository by using the following command.
[root@linuxhelp ~]# yum repolist enabled | grep " mysql.*-community.*"
mysql-connectors-community/x86_64 MySQL Connectors Community 21
mysql-tools-community/x86_64 MySQL Tools Community 33
mysql57-community/x86_64 MySQL 5.7 Community Server 74
MySQL installation
Now install the MySQL package by using the following command.
[root@linuxhelp ~]# yum install mysql-community-server
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: ftp.iitm.ac.in
* epel: mirror.premi.st
* extras: ftp.iitm.ac.in
* rpmforge: mirror.oscc.org.my
* updates: ftp.iitm.ac.in
Resolving Dependencies
--> Running transaction check
.
.
.
Replaced:
mariadb.x86_64 1:5.5.47-1.el7_2 mariadb-libs.x86_64 1:5.5.47-1.el7_2
Complete!
To check MySQL status
Now start the MySQL service and check the status
[root@linuxhelp ~]# service mysqld start Redirecting to /bin/systemctl start mysqld.service [root@linuxhelp ~]# service mysqld status Redirecting to /bin/systemctl status mysqld.service ? mysqld.service - MySQL Server Loaded: loaded (/usr/lib/systemd/system/mysqld.service enabled vendor preset: disabled) Active: active (running) since Tue 2016-05-24 13:34:20 IST 13s ago . . . May 24 13:34:11 linuxhelp systemd[1]: Starting MySQL Server... May 24 13:34:20 linuxhelp systemd[1]: Started MySQL Server.
To check MySQL version
Now check the MySQL version by using the following command.
[root@linuxhelp ~]# mysql --version
mysql Ver 14.14 Distrib 5.7.12, for Linux (x86_64) using EditLine wrapper
Now the latest version of MySQL will be successfully installed
Securing the mysql server by providing username and password. Run the below command and make the setting which I entered below.
[root@linuxhelp ~]# mysql_secure_installation Securing the MySQL server deployment. Enter password for user root: 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: LOW Length > = 8 MEDIUM Length > = 8, numeric, mixed case, and special characters STRONG Length > = 8, numeric, mixed case, special characters and dictionary file Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 0 Using existing password for root. Estimated strength of the password: 25 Change the password for root ? ((Press y|Y for Yes, any other key for No) : y New password: Enter your new mysql password Re-enter new password: re-enter your new mysql password Estimated strength of the password: 50 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!
To connect to MySQL server
Start connecting into MySQL server. Run the below command and give the MySQL root password.
[root@linuxhelp ~]# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with or g. Your MySQL connection id is 6 Server version: 5.7.12 MySQL Community Server (GPL) Copyright (c) 2000, 2016, 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>
That’ s all about installation procedure of MySQL latest version 5.7.12 into CentOS 7.2.
Comments ( 0 )
No comments available