• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

The Geek Diary

CONCEPTS | BASICS | HOWTO

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • Linux Services
    • VCS
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
    • Data Guard
  • DevOps
    • Docker
    • Shell Scripting
  • Interview Questions
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

Archives for February 2021

How to set the default character set in MySQL and how to propagate it in a master-master replication scenario

By admin

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 this: +--------------------------+----------------------------+ | Variable_name | Value … [Read more...] about How to set the default character set in MySQL and how to propagate it in a master-master replication scenario

Filed Under: mysql, MySQL Cluster

“Connection reset by peer” – error while ssh into a CentOS/RHEL system with a specific user only

By admin

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 remote host [NODE2]: Connection reset by peer Connection to [NODE2] closed. [oracle@NODE1]$ ssh root@[NODE2] root@[NODE2]'s … [Read more...] about “Connection reset by peer” – error while ssh into a CentOS/RHEL system with a specific user only

Filed Under: CentOS/RHEL, CentOS/RHEL 5, CentOS/RHEL 6, CentOS/RHEL 7

MySQL: how to figure out which session holds which table level or global read locks

By admin

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. Please look at the example below. mysql> use performance_schema ... snip ... mysql> update performance_schema.setup_instruments set enabled='yes', timed='yes' where name = … [Read more...] about MySQL: how to figure out which session holds which table level or global read locks

Filed Under: mysql

Recommended Configuration of the MySQL Performance Schema

By admin

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 some additional consumers and instruments. While the below suggestions usually only causes a small or no overhead, it is worth testing whether the overhead of additional … [Read more...] about Recommended Configuration of the MySQL Performance Schema

Filed Under: mysql

MySQL: Identify what user and thread are holding on to a meta data lock that is preventing other queries from running

By admin

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 determine whether metadata lock instrumentation is enabled, check the performance_schema.setup_instruments table like: mysql> SELECT * FROM … [Read more...] about MySQL: Identify what user and thread are holding on to a meta data lock that is preventing other queries from running

Filed Under: mysql

MySQL: How to kill a Long Running Query using max_execution_time

By admin

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 name and syntax). There are two ways to set an upper limit of how long a read-only SELECT statement is allowed to execute: the … [Read more...] about MySQL: How to kill a Long Running Query using max_execution_time

Filed Under: mysql

“Preauthentication Failed While Getting Initial Credentials” – Kerberos Error

By admin

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 password is incorrect. Update the keytab file on the problematic Kerberos client with the key provided from … [Read more...] about “Preauthentication Failed While Getting Initial Credentials” – Kerberos Error

Filed Under: CentOS/RHEL

“Couldn’t authenticate with keytab while discovering which salt to use: hostname: KDC has no support for encryption type” – error while joining domain

By admin

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 time to /var/log/messages: Feb 20 16:23:52 [hostname] [sssd[ldap_child[27134]]]: Failed to initialize credentials using keytab … [Read more...] about “Couldn’t authenticate with keytab while discovering which salt to use: hostname: KDC has no support for encryption type” – error while joining domain

Filed Under: CentOS/RHEL, CentOS/RHEL 6, CentOS/RHEL 7

How to Switch Back To Previous Version of openjdk in CentOS/RHEL

By admin

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 openjdk java-1.8.0-openjdk-1.8.0.51-1.b16.el6_7.x86_64 … [Read more...] about How to Switch Back To Previous Version of openjdk in CentOS/RHEL

Filed Under: CentOS/RHEL, CentOS/RHEL 6, CentOS/RHEL 7

“systemd-udevd: Cannot Allocate Memory” and “A start job is running for dev-mapper-\x2droot.device” – CentOS/RHEL 7 booting issue

By admin

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 commands with VG metadata and PV state. LVM commands will then avoid reading the information from disks. If there … [Read more...] about “systemd-udevd: Cannot Allocate Memory” and “A start job is running for dev-mapper-\x2droot.device” – CentOS/RHEL 7 booting issue

Filed Under: CentOS/RHEL, CentOS/RHEL 7

Next Page »

Primary Sidebar

Recent Posts

  • SQL script to find tables that are fragmented
  • TRUNCATE TABLE not releasing space from tablespace
  • How to reclaim entire space of an oracle database table with “Truncate Table” statement
  • Oracle SQL Script to Report Tablespace Free and Fragmentation
  • Archives
  • Contact Us
  • Copyright

© 2021 · The Geek Diary