In this post, we will see how to change the default character set from the default latin1_swedish_c to utf8_general_ci (or any other) and how to propagate charset changes in a master-master replication environment. 1. First determine the current default values, by issuing the MySQL command: mysql> show variables like ‘%character_set_%’; This will return something like […]
Archives for February 2021
“Connection reset by peer” – error while ssh into a CentOS/RHEL system with a specific user only
The Problem When trying to open an ssh connection to a system with a specific account, it failed with ‘Connection reset by peer’. Other users can successfully connect with ssh to this system. Below is an example showing the failed login to node [NODE2] with the account ‘oracle’. [oracle@NODE1]$ ssh oracle@[NODE2] oracle@[NODE2]’s password: Read from […]
MySQL: how to figure out which session holds which table level or global read locks
Question: How to Retrieve Table Level or Global Read Lock Status from Running MySQL Server? Prior to MySQL 5.7, it is not possible to figure out table level or global read locks held by each sessions. As of MySQL 5.7, a new performance schema table, metadata_locks is added. This performance schema can achieve the goal. […]
Recommended Configuration of the MySQL Performance Schema
In this post, we will see how to configure the Performance Schema and avoid it becomes a performance bottleneck. The default settings are a good starting point. Those have been extensively tested to ensure that in the vast majority of cases, they will not cause a severe overhead. It can be worth considering to enable […]
MySQL: Identify what user and thread are holding on to a meta data lock that is preventing other queries from running
The preferred solution depends on the version of MySQL. If you are using MySQL 5.7 or later with metadata lock instrumentation enabled in the Performance Schema (available in MySQL 5.7 and later), it is possible to get the information directly from the performance_schema.metadata_locks table. Otherwise, there is no direct way to get the information. To […]
MySQL: How to kill a Long Running Query using max_execution_time
In this post, we will learn about what options are available if you need to automatically kill long-running queries. MySQL 5.7 and Later For SELECT Statement Starting from MySQL 5.7.4 there is support for automatic timeouts of read-only SELECT statements (the following discussion assumes 5.7.8 or later as the feature had changes to the option/hint […]
“Preauthentication Failed While Getting Initial Credentials” – Kerberos Error
The Problem Not able to log into Kerberos using the keytab file. When trying to use the keytab file to log in, the following error is seen: Command: kinit -k -V -t [name].keytab HTTP/[PrincipalName] Error: kinit: preauthentication failed while getting initial credentials The Solution The error, “Preauthentication failed while getting initial credentials” happens when the […]
“Couldn’t authenticate with keytab while discovering which salt to use: hostname: KDC has no support for encryption type” – error while joining domain
The Problem A CentOS/RHEL 6 client fails to be enrolled in an Active Directory domain, with the adcli command randomly failing with the following error written to the console: Couldn’t authenticate with keytab while discovering which salt to use: [SERVER$@DOMAIN_NAME]: KDC has no support for encryption type The following errors are logged at the same […]
How to Switch Back To Previous Version of openjdk in CentOS/RHEL
Question: How to downgrade the Java version which got installed/updated during system patching? The “java” command does not run the JVM that has been installed. Java applications can fail to run if an unexpected Java Runtime Environment is found. Recent version is – java-1.8.0-openjdk-1.8.0.51-1.b16.el6_7.x86_64 Required version is – java-1.7.0-openjdk-1.7.0.85-2.6.1.3.0.1.el6_7.x86_64 # rpm -qa | grep -i […]
“systemd-udevd: Cannot Allocate Memory” and “A start job is running for dev-mapper-\x2droot.device” – CentOS/RHEL 7 booting issue
The Problem System cannot proceed with the boot process, stuck with an error messages: systemd-udevd[369]: fork of ‘/bin/sh -c ‘>/tmp/.lvm_scan-sdc;” failed: Cannot allocate memory A start job is running for dev-mapper-\x2droot.device The Solution If the systemd unit called lvmetad is enabled and running, the metadata is cached which reduces disk scanning and it provides LVM […]