MySQL 8 Enterprise - shaysalomon12/Data-Engineer GitHub Wiki

MySQL 8 Enterprise on Centos 7

Download MySQL Software from:

Installing MySQL on Linux Using RPM Packages from Oracle:

MySQL 8 Enterprise on Centos 8

  1. Download MySQL media from:
  • V1034862-01.zip - 1gb
  • V1034870-01.zip - 0.5gb
  1. Login to Linux as root (or sudo user), upload and unzip files:
$ unzip V1034862-01.zip
$ unzip V1034870-01.zip
$ tar –xvzf mysql-commercial-8.0.33-1.1.el8.x86_64.repo.tar.gz
  1. Stop Firewall:
$ sudo firewall –cmd --state
$ sudo systemctl stop firewalld
$ sudo systemctl disable firewalld
  1. Disable SELinux
$ sudo setenforce 0
$ vi /etc/selinux/config
Cahnge:
SELINUX=permissive
  1. Run yum localinstall:
$ sudo yum localinstall mysql-commercial-*.rpm
  1. Start mysql as a service:
$ sudo systemctl start mysqld.service
$ sudo systemctl enable mysqld.service
  1. Grep the temporary root password created:
$ sudo grep 'temporary password' /var/log/mysqld.log
  1. Login with the temporary password:
$ mysql -u root -p
  1. Change mysql root user password and secure database server installation:
$ sudo mysql_secure_installation

Or:

mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'dzB@2a3RAdmin!';

And add other account:

mysql> CREATE USER 'dba'@'%' IDENTIFIED WITH mysql_native_password BY 'dzB@2a3RAdmin!';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'dba'@'%' WITH GRANT OPTION;
  1. Test your settings:
$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 13
Server version: 8.0.26 MySQL Community Server - GPL

Copyright (c) 2000, 2021, Oracle and/or its affiliates.

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> SELECT VERSION();
+-----------+
| VERSION() |
+-----------+
| 8.0.26    |
+-----------+
1 row in set (0.00 sec)

mysql> quit
Bye

MySQL 8 Master-Master Replication

MySQL 8 InnoDB Cluster