(: December 3, 2018)

This guide is to help you with Installing MySQL Server on CentOS 7 / CentOS 6. I’ll show you how to install MySQL 5.5/5.6/5.7 and the latest stable release of MySQL, which as of this writing is MySQL 8.0

To start installing MySQL server on CentOS 7/6, you need to add the official MySQL community repository to your system. Run below commands to add it,

sudo yum localinstall https://dev.mysql.com/get/mysql80-community-release-el7-1.noarch.rpm

Install MySQL 8 on CentOS

Now that repo is added, you can install MysQL 8 without editing repository content since repo for 8 is enabled by default.

.td_uid_2_5d90601484b2d_rand.td-a-rec-img{text-align:left}.td_uid_2_5d90601484b2d_rand.td-a-rec-img img{margin:0 auto 0 0}
sudo yum --enablerepo=mysql80-community install mysql-community-server

Install MySQL 5.7 on CentOS

To install MySQL 5.7, you need to disable mysql80-community repository then download it.

sudo yum --disablerepo=mysql80-community --enablerepo=mysql57-community install mysql-community-server

Install MySQL 5.6 on CentOS

To install MySQL 5.6, you need to disable mysql80-community repository then download it.

sudo yum --disablerepo=mysql80-community --enablerepo=mysql56-community install mysql-community-server

Start MySQL Service

For CentOS 7, use systemd to start mysql service:

sudo systemctl enable  --now mysqld.service

For CentOS 6, use service command line tool.

sudo /etc/init.d/mysql start 
sudo chkconfig --levels 235 mysqld on

Set MySQL root password

Installation of MySQL on CentOS 6 generates a temporary password for you. You can get it by running:

grep 'A temporary password is generated for [email protected]' /var/log/mysqld.log |tail -1

It will look like below:

# [email protected]: ?h(UwcrvQ7jr

Change mysql root user password

# mysqladmin -u root password [your_password_here]
# mysql_secure_installation

Configure Firewall

With iptables:

sudo iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
sudo service iptables restartt


sudo firewall-cmd --add-service mysql --permanent
sudo firewall-cmd --reload

Test your settings:

$ mysql -u root -p
Enter password: 
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 7
Server version: 5.7.22 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

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

mysql> show databases;
.td_uid_4_5d90601484dae_rand.td-a-rec-img{text-align:left}.td_uid_4_5d90601484dae_rand.td-a-rec-img img{margin:0 auto 0 0}
  • i3 ssh configuration to unlock without passphrase
  • Gavin Andresen Proposes Bitcoin Hard Fork to Address Network Scalability
  • Singapore Court Dismisses Summary Judgment for $43 Million Bitcoin Dispute
  • Five New Year’s Resolutions for Bitcoiners Everywhere
  • Ethereum Investment Vehicle Now Live on Swiss Stock Exchange SIX
  • How to Trim and Convert Videos in VLC
  • Install Visual Studio Code Arch Linux
  • Consulting Firms Face Talent Shortage As Blockchain Offerings Grow
  • Blockchain Awards to Honor Bitcoin Leadership at Bitcoin 2014
  • Debian / Ubuntu: Install gem The FrontEnd To Rubygems
  • How To Install Prometheus and node_exporter on Debian 10 (Buster)
  • South Korea is Debating New Bitcoin Exchange Rules
  • Opera Launches Desktop Dapp Browser With Built-In Ethereum Wallet
  • Hacker Returns $26 Million in Ether Months After ICO Theft
  • psql: FATAL: Ident authentication failed for user "username" Error and Solution
  • SXI LLC Company
    SXI.IO is a global Blockchain software company, specialized in developing white label crypto exchange platforms , Wallet platforms, ICO platforms, Token Erc20 .....
    Fully Managed VPS Fully Managed VPS Fully Managed VPS

    You Might Also Enjoy NewS Post

    Best Free Web Hosting 2020

    Free Hosting 1GB $0.00 USD/mo Disk space 1GB Traffic 10GB/Month Domains 2 Plesk Cpanel Databases 10 Free 12 Month https://my.sxi.io/cart.php?a=add&pid=196

    02/05/2020 READ MORE