Skip to main content

Posts

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-se...

Ansible commands

Ansible Commands: ansible all -m ping -u mysql -k ansible-playbook mysql8.yml -k -vvv ansible-playbook mysql8.yml -vvv ansible-galaxy - command to manage Ansible roles in shared repostories ansible-config - View, edit, and manage ansible configuration ansible-console - a REPL that allows for running ad-hoc tasks against a chosen inventory ansible-doc - displays  information  on  modules  installed in Ansible libraries.  It displays a terse listing of plugins and their short descriptions, provides a printout of their DOCUMENTATION strings ansible-inventory - used to display or dump the configured inventory as Ansible sees it ansible-playbook - the tool to run Ansible playbooks, which are a configuration and multinode deployment system. ansible-pull - is  used  to up a remote copy of ansible on each managed node, each set to run via cron and update playbook source via a source repository.  This inverts the default push architecture of ansi...

MySQL 5.7 Install | Configure MySQL | Configure MySQL Replication | Configure systemd for single instance

Install MySQL 5.7 Community Edition on Linux: #yum install mysql80-community-release-el7-1.noarch.rpm #yum install mysql-community-server #yum install perl-DBD-MySQL-4.023-6.el7.x86_64.rpm #yum install percona-release-0.1-4.noarch.rpm Increase no. of open files: Edit file /etc/security/limits.conf and includes as follows, which will increase no of open files for mysql user to 65535 from 1024 which is default. excute ulimit -a after sudo to mysql, if you are logged in exit and login again then and then only you will be able to see it. mysql              soft     nofile           65535 mysql             hard     nofile           65535 Ref.: https://dev.mysql.com/doc/refman/8.0/en/linux-installation-yum-repo.html https://jinyuwang.weebly.co...

Configure single MySQL instance with systemctl

Configure mysqld service to start and stop using systemctld: A fter installing MySQL initialize and start MySQL instance: mysqld --defaults-file=/etc/instance_name.cnf --initialize-insecure & mysqld --defaults-file=/etc/instance_name.cnf &   mysqladmin -uroot -S/mysql/instance_name/data/instance_name.sock shutdown ***** su to user root ***** edit file /usr/lib/systemd/system/ mysqld.service and add following         [Service]         PIDFile=/mysql/instance_name/data/instance_name.pid         ExecStart=/usr/sbin/mysqld --defaults-file=/etc/instance_name.cnf --daemonize --pid-file=/mysql/instance_name/data/instance_name.pid $MYSQLD_OPTS   $sudo systemctl daemon-reload $sudo systemctl start mysqld $sudo systemctl enable mysqld ***** su to root ***** #reboot ***** su to user mysql ***** $mysql -uroot -S/mysql/instance_name/data/instance_name.sock   mysql> alter user 'root...

Install MySQL community edition | multiple instances same machine | configure systemctld

Install MySQL 5.7.22 Community edition: #yum install mysql-community-server #yum install perl-DBD-MySQL-4.023-6.el7.x86_64.rpm #yum install percona-release-0.1-4.noarch.rpm Configure multiple instances instance1 and instance2 on the same machine: 01.    Backup existing my.cnf file to my.cnf.bkup 02.    Edit my.cnf with following [root@server_name]# cat /etc/my.cnf [mysqld@instance1] datadir = /mysql/instance1/data socket = /mysql/instance1/data/instance1.sock port = 3777 server-id = 3777 log-error = /mysql/instance1/data/instance1.err   [mysqld@instance2] datadir = /mysql/instance2/data socket = /mysql/instance2/data/instance2.sock port = 3999 server-id = 3999 log-error = /mysql/instance2/data/instance2.err Start mysql instance using system: #systemctl start mysqld@instance1 #systemctl start mysqld@instance2 It will create database files at /mysql/instance1/data/ and /mysql/instance2/data/ Check status: [root@mysqlhost system]# systemctl status mysql...