Skip to main content

MySQL 8.0.12 Enterprise Edition Installation on Linux

MySQL 8.0.12 Enterprise edition Installation using rpm:

MySQL 8.0.12 enterprise edition require following rpms to install it MySQL database server.

  • mysql-commercial-backup - MySQL Enterprise Backup (added in 8.0.11)
  • mysql-commercial-client - MySQL client applications and tools
  • mysql-commercial-common - Common files for server and client libraries
  • mysql-commercial-devel - Development header files and libraries for MySQL database client applications
  • mysql-commercial-embedded-compat - MySQL server as an embedded library with compatibility for applications using version 18 of the library
  • mysql-commercial-libs - Shared libraries for MySQL database client applications
  • mysql-commercial-libs-compat - Shared compatibility libraries for previous MySQL installations; the version of the libraries matches the version of the libraries installed by default by the distribution you are using
  • mysql-commercial-minimal-debuginfo    - Debug information for package mysql-commercial-server-minimal; useful when developing applications that use this package or when debugging this package
  • mysql-commercial-server    - Database server and related tools
  • mysql-commercial-server-minimal    - Minimal installation of the database server and related tools (added in 8.0.0)
  • mysql-commercial-test - Test suite for the MySQL server

Install using yum package manager on RHEL:

#yum install  mysql-commercial-common-8.0.12-1.1.el7.x86_64.rpm
#yum install mysql-commercial-libs-8.0.12-1.1.el7.x86_64.rpm
#yum install mysql-commercial-client-8.0.12-1.1.el7.x86_64.rpm
#yum install mysql-commercial-server-8.0.12-1.1.el7.x86_64.rpm
#yum install mysql-commercial-backup-8.0.12-1.1.el7.x86_64.rpm
#yum install mysql-commercial-minimal-debuginfo-8.0.12-1.1.el7.x86_64.rpm
#yum install mysql-commercial-devel-8.0.12-1.1.el7.x86_64.rpm
#yum install mysql-commercial-embedded-compat-8.0.12-1.1.el7.x86_64.rpm


OR

yum install mysql-commercial-{server,client,common,libs}-* mysql-8.*­ --exclude='*minimal*'

Create /etc/my.cnf file as follows:

[mysqld]
socket                       = /mysql/db_name/data/db_name.sock
port                         = 3551
pid-file                     = /mysql/db_name/data/db_name.pid
datadir                      = /mysql/db_name/data
user                         = mysql
tmpdir                       = /mysql/db_name/temp
slow_query_log               = on
slow_query_log_file          = /mysql/db_name/logs/<host_name>-slow.log
log-error                    = /mysql/db_namedev/logs/db_name.err
####    InnoDB parameters    ####
innodb_data_home_dir                 = /mysql/db_name/data
innodb_log_group_home_dir            = /mysql/db_name/iblogs
innodb_flush_method                  = O_DIRECT
innodb_log_file_size                 = 300M
innodb_log_files_in_group            = 2
innodb_autoextend_increment          = 50
innodb_flush_log_at_trx_commit       = 0
innodb_buffer_pool_size              = 1G
innodb_buffer_pool_instances         = 5
####    Binlog Configuration #####
binlog_format=ROW
log_bin = /mysql/db_name/binlogs/db_name-bin
log_bin_index = /mysql/db_name/binlogs/db_name-bin.index
max_binlog_size=50M

Become root user and initialize mysqld:
#mysqld --defaults-file=/etc/my.cnf --initialize &

Get temporary password from log file:
#grep -i generate /mysql/db_name/logs/db_name.err

Start mysqld using user mysql:
$ mysqld --defaults-file=/etc/my.cnf &

mysql> alter user 'root'@'localhost' identified by '<your_code>';
mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '<your_code>';
mysql> select * from mysql.user \G
mysql> show databases;

Configure mysqld to start, stop using systemctl:

Shutdown mysqld:
$  mysqladmin -uroot -proot123# -S/mysql/db_name/data/<db_name>.sock shutdown

Configure systemd to start and stop mysqld:

Edit file - /usr/lib/systemd/system/mysqld.service and add following under Service
PIDFile=/mysql/db_name/data/db_name.pid
ExecStart=/usr/sbin/mysqld --defaults-file=/etc/my.cnf --daemonize --pid-file=/mysql/db_name/data/db_name.pid $MYSQLD_OPTS
Reload mysqld:
#systemctl reload-daemon
Start mysqld service using systemctl:
#systemctl start mysqld

If you get permission denied error, set SELINUX to permissive  - http://shrenikp.blogspot.com/2018/11/mysql-error-could-not-open-file.html
Check sytemctl status:
#systemctl status mysqld

Comments

Popular posts from this blog

MySQL InnoDB cluster troubleshooting | commands

Cluster Validation: select * from performance_schema.replication_group_members; All members should be online. select instance_name, mysql_server_uuid, addresses from  mysql_innodb_cluster_metadata.instances; All instances should return same value for mysql_server_uuid SELECT @@GTID_EXECUTED; All nodes should return same value Frequently use commands: mysql> SET SQL_LOG_BIN = 0;  mysql> stop group_replication; mysql> set global super_read_only=0; mysql> drop database mysql_innodb_cluster_metadata; mysql> RESET MASTER; mysql> RESET SLAVE ALL; JS > var cluster = dba.getCluster() JS > var cluster = dba.getCluster("<Cluster_name>") JS > var cluster = dba.createCluster('name') JS > cluster.removeInstance('root@<IP_Address>:<Port_No>',{force: true}) JS > cluster.addInstance('root@<IP add>,:<port>') JS > cluster.addInstance('root@ <IP add>,:<port> ') JS > dba.getC...

InnoDB cluster Remove Instance Force | Add InnoDB instance

InnoDB cluster environment UUID is different on node: To fix it stop group replication, remove instance (use force if require), add instance back Identify the node which is not in sync: Execute following SQL statement on each node and identify the node has different UUID on all nodes. mysql> select * from mysql_innodb_cluster_metadata.instances; Stop group replication: Stop group replication on the node which does not have same UUID on all nodes. mysql > stop GROUP_REPLICATION; Remove instances from cluster: Remove all secondary node from the cluster and add them back if require. $mysqlsh JS >\c root@<IP_Address>:<Port_No> JS > dba.getCluster().status() JS > dba.getCluster () <Cluster:cluster_name> JS > var cluster = dba.getCluster("cluster_name"); JS >  cluster.removeInstance('root@<IP_Address>:<Port_No>'); If you get "Cluster.removeInstance: Timeout reached waiting......" JS > cluster.removeInstance(...

Oracle E-Business Suite Online Patch Phases executing adop

Following description about Oracle E-Business Suite is high level and from documentation https://docs.oracle.com/cd/E26401_01/doc.122/e22954/T202991T531062.htm#5281339 for in depth and detail description refer it. The online patching cycle phases: Prepare Apply Finalize Cutover Cleanup Prepare phase: Start a new online patching cycle, Prepares the environment for patching. $ adop phase=prepare Apply phase: Applies the specified patches to the environment. Apply one or more patches to the patch edition. $ adop phase=apply patches=123456,789101 workers=8 Finalize phase: Performs any final steps required to make the system ready for cutover. Perform the final patching operations that can be executed while the application is still online. $ adop phase=finalize Cutover phase: Shuts down application tier services, makes the patch edition the new run edition, and then restarts application tier services. This is the only phase that involves a brief ...