Install MySQL 8.0 on Fedora 29/28, CentOS/RHEL 7.6/6.10

0
254

MySQL is a relational database management system (RDBMS) that runs as a server providing multi-user access to a number of databases. This is guide, howto install or upgrade MySQL Community Server latest version 8.0 (8.0.13)/5 on Fedora 28/29, CentOS 7.5/6.10 and Red Hat (RHEL) 7.6/6.10. MySQL 8.0 is an extremely exciting new version of the world’s most popular open source database with improvements across the board. Some key enhancements include

Note: If you are upgrading MySQL (from earlier version), then make sure that you backup (dump and copy) your database and configs. And remember run mysql_upgrade command.

 

Top Mysql 8.0 Features:

  1. SQL Window functions, Common Table Expressions, NOWAIT and SKIP LOCKED, Descending Indexes, Grouping, Regular Expressions, Character Sets, Cost Model, and Histograms.
  2. JSON Extended syntax, new functions, improved sorting, and partial updates. With JSON table functions you can use the SQL machinery for JSON data.
  3. GIS Geography support. Spatial Reference Systems (SRS), as well as SRS aware spatial datatypes, spatial indexes, and spatial functions.
  4. Reliability DDL statements have become atomic and crash safe, meta-data is stored in a single, transactional data dictionary. Powered by InnoDB!
  5. Observability Significant enhancements to Performance Schema, Information Schema, Configuration Variables, and Error Logging.
  6. Manageability Remote management, Undo tablespace management, and new instant DDL.
  7. Security OpenSSL improvements, new default authentication, SQL Roles, breaking up the super privilege, password strength, and more.
  8. Performance InnoDB is significantly better at Read/Write workloads, IO bound workloads, and high contention “hot spot” workloads. Added Resource Group feature to give users an option optimize for specific workloads on specific hardware by mapping user threads to CPUs.

Install MySQL Database 8.0.13/5.7.23 on Fedora 28/29, CentOS 7.5/6.10, Red Hat (RHEL) 7.6/6.10

1. Change root user

2. Install MySQL YUM repository

Fedora

CentOS and Red Hat (RHEL)

3a. Update or Install MySQL 8.0.13

Fedora 28/29

CentOS 7.5/6.10 and Red Hat (RHEL) 7.6/6.10

4. Start MySQL server and autostart MySQL on boot

Fedora 28/29 and CentOS 7.5 and Red Hat (RHEL) 7.6/7.5

CentOS 6.10 and Red Hat (RHEL) 6.10

5. Get Your Generated Random root Password

Example Output:

And root password is: fQGM*ec61-s#

you can Keep this password if you like :

6. MySQL Secure Installation

  • Change root password
  • Remove anonymous users
  • Disallow root login remotely
  • Remove test database and access to it
  • Reload privilege tables

Start MySQL Secure Installation with following command

 

 

Note: If you don’t want some reason, do a “MySQL Secure Installation” then at least it’s very important to change the root user’s password

7. Connect to MySQL database (localhost) with password

8. Create Database, Create MySQL User and Enable Remote Connections to MySQL Database

This example uses following parameters:

  • DB_NAME = osradar
  • USER_NAME = osradar_user
  • PASSWORD = 1234567@@@Osradar
  • PERMISSIONS = ALL

Please note : to allow connection from remote IP . please change Localhost with Remore IP

Verify The USER mysql access:

Enable Remote Connection to MariaDB Server –> Open MySQL Port (3306) on Iptables Firewall (as root user again)

1. Fedora 28/29 and CentOS/Red Hat (RHEL) 7.6

1.1 Add New Rule to Firewalld

1.2 Restart firewalld.service

2. CentOS/Red Hat (RHEL) 6.10

2.1 Edit /etc/sysconfig/iptables file:

2.2 Add following INPUT rule:

2.3 Restart Iptables Firewall:

3. Test remote connection

Spread the love
  • 3
    Shares

PS. If you like this post please share it with your friends on the social networks using the buttons above.Thanks.

LEAVE A REPLY

Please enter your comment!
Please enter your name here