MySQL 8.0.12 Enterprise edition Installation using rpm:
MySQL 8.0.12 enterprise edition require following rpms to install it MySQL database 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
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
Post a Comment