Bobcares

WeSupport

Call Us! 1-800-383-5193
Call Us! 1-800-383-5193
Call Us! 1-800-383-5193

Need Help?

Emergency Response Time custom

Our experts have had an average response time of 11.06 minutes in March 2021 to fix urgent issues.

We will keep your servers stable, secure and fast at all times for one fixed price.

Disabling database UTF8 connectivity – How to do

by | Mar 23, 2021

Disabling database UTF8 connectivity is quite easy. We can accomplish it by just running few commands.

Here at Bobcares, we have seen several such Nagios-related queries as part of our Server Management Services for web hosts and online service providers.

Today, let us see how to disable UTF8 connectivity to the MySQL/MariaDB databases for Nagios XI.

 

know more about UTF-8 encoding

The UTF-8 encoding represents every symbol in the Unicode character set. It ranges from U+000000 to U+10FFFF.

Also, UTF-8 is a variable-width encoding; it encodes each symbol using one to four 8-bit bytes.

Symbols with lower numerical code point values are encoded using fewer bytes. This way, UTF-8 is optimized for the common case where ASCII characters and other BMP symbols are used — while still allowing astral symbols to be stored.

In this article, let us see how to disable UTF8 connectivity to the MySQL/MariaDB databases for Nagios XI.

 

Disabling database UTF8 connectivity

Now let us see how our Support Engineers disable database utf8 connectivity.

The Nagios XI Configuration Directive

In Nagios XI 5.4.13, the following configuration directive was added:

$cfg[‘db_conn_utf8’] = 0;

In order to determine if the directive is enabled or not, we establish a terminal session to Nagios XI server as the root user. Then we execute the following command:

grep db_conn_utf8 /usr/local/nagiosxi/html/config.inc.php

If the grep command produces NO output, then the directive does not exist in our configuration and we need to add it. We can add it using the following command:

printf “\n\$cfg[‘db_conn_utf8’] = 0;\n” >> /usr/local/nagiosxi/html/config.inc.php

If the grep command produces output, then we can change it with the following command (sets it to 0):

sed -i “s/db_conn_utf8’\] =.*/db_conn_utf8’\] = 0;/g” /usr/local/nagiosxi/html/config.inc.php

Defining the directive to 0 will resolve the issue for garbled or ??? characters.

If we want to change it to 1, we use the following command:

sed -i “s/db_conn_utf8’\] =.*/db_conn_utf8’\] = 1;/g” /usr/local/nagiosxi/html/config.inc.php

The change takes effect immediately.

[Need any further assistance with Nagios-related queries? – We are here to help you]

 

Conclusion

Today, we saw how our Support Engineers configure disable UTF8 connectivity to the MySQL/MariaDB databases

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *