Installing mysql2
gem errors on MacOS Catalina with MySQL 5.7.
Make sure openssl
is installed on Mac via Homebrew.
brew install openssl
#!/bin/sh | |
# you might want to add some user authentication here | |
mysql -e "show variables; show status" | awk ' | |
{ | |
VAR[$1]=$2 | |
} | |
END { | |
MAX_CONN = VAR["max_connections"] | |
MAX_USED_CONN = VAR["Max_used_connections"] | |
BASE_MEM=VAR["key_buffer_size"] + VAR["query_cache_size"] + VAR["innodb_buffer_pool_size"] + VAR["innodb_additional_mem_pool_size"] + VAR["innodb_log_buffer_size"] |
--- | |
# Commonly used screens these days easily fit more than 80 characters. | |
Layout/LineLength: | |
Max: 120 | |
# Too short methods lead to extraction of single-use methods, which can make | |
# the code easier to read (by naming things), but can also clutter the class | |
Metrics/MethodLength: | |
Max: 20 |
# Optimized my.cnf configuration for MySQL/MariaSQL | |
# | |
# by Fotis Evangelou, developer of Engintron (engintron.com) | |
# | |
# ~ Updated January 2020 ~ | |
# | |
# | |
# The settings provided below are a starting point for a 2GB - 4GB RAM server with 2-4 CPU cores. | |
# If you have different resources available you should adjust accordingly to save CPU, RAM & disk I/O usage. | |
# |
Install and configure MySQL with master-slave replication. The benefits of this include high availability, backups, disaster recovery and reporting.
For tutorial purposes, we will be using one master node and one slave node.
Master Node: 10.0.0.10
Slave Node: 10.0.0.11
Sometimes when creating a new CentOS 7 server, the drive is partioned with the root, boot and swap, and then all the rest of the space is given to the home directory.
Here, we are going to reduce the size of the /home
partition and allocate the remaining space back to the root partition.
List the current block devices
sudo: required | |
dist: trusty | |
addons: | |
apt: | |
sources: | |
- chef-current-trusty | |
packages: | |
- chefdk |
For MacOS Catalina, visit Install mysql2 on MacOS Catalina
Installing mysql2
gem errors on MacOS Mojave.
Make sure openssl
is installed on Mac via Homebrew.