Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Switch default collation?

Discussion in 'Database Discussions' started by MaxFein, Nov 14, 2017.

  1. MaxFein

    MaxFein Member

    Joined:
    Jul 29, 2015
    Messages:
    13
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    Portland, Oregon, USA, Earth
    cPanel Access Level:
    Root Administrator
    Hi, I want to control the charset/collation on my server to match what I want my WP web application to use and I'd like to switch my default collation from utf8mb4_unicode_ci to utf8mb4_unicode_520_ci - wondering if I should expect to be able to do this.

    I currently have no user-created databases (though previously I have) - currenty, I see only following databases on server, with their current collation:

    cphulkd utf8mb4_unicode_ci
    information_schema utf8_general_ci
    leechprotect utf8mb4_unicode_ci
    modsec utf8mb4_unicode_ci
    mysql utf8mb4_unicode_ci
    performance_schema utf8_general_ci
    roundcube utf8mb4_unicode_ci
    tmpdir utf8mb4_unicode_ci

    currently in my.cnf I have:

    [client]
    default-character-set=utf8mb4

    [mysql]
    default-character-set=utf8mb4
    no-auto-rehash

    [mysqld]
    character_set_server=utf8mb4
    collation_server=utf8mb4_unicode_ci
    init_connect='SET NAMES utf8mb4'

    running CENTOS 7.4 w/ WHM/cPanel v68.0.13 and MariaDB 10.2.3

    Everything is working until I try changing the collation_server value to

    collation_server=utf8mb4_unicode_520_ci


    It seems to me that I should be able to do this (eg. this doc), however after making the change and restart of MySQL service I get errors, eg. trying to visit cPanel>MySQL Databases IU panel it says that the MySQL server is down and show an error mssg:

    _________________
    Error while connecting to MySQL: (XID 6cn9gg) The system failed to connect to the “MySQL” database “mysql” because of an error: 2019 (Can't initialize character set unknown (path: compiled_in)) Error while connecting to MySQL: (XID 6cn9gg) The system failed to connect to the “MySQL” database “mysql” because of an error: 2019 (Can't initialize character set unknown (path: compiled_in)) at /usr/local/cpanel/Cpanel/Mysql.pm line 167, <STDIN> line 1.
    _________________

    The restart via WHM showed as successful, WHM service status shows MySQL as up.

    I also got an email from my server:

    _________________
    The system was unable to authenticate to the local MySQL/MariaDB server on “localhost”.

    The connection driver reported the following error: Cpanel::Exception::Database::ConnectError/(XID ym29g7) The system failed to connect to the “MySQL” database “mysql” because of an error: 2019 (Can't initialize character set unknown (path: compiled_in))

    You can reset the MySQL/MariaDB root password in WHM’s MySQL Root Password interface at: https://host.example.com:2087/scripts/mysqlrootpass
    _________________

    (As a note, the script location now seems to be at /scripts2/mysqlrootpass)

    When I reset the password it seems to make no difference.

    I have contacted my host and they think that the issue is basically that cPanel will not work with this setting - hoping for some clarification.

    Thanks, Max
     
    #1 MaxFein, Nov 14, 2017
    Last edited: Nov 14, 2017
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    41,502
    Likes Received:
    1,616
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Could you open a support ticket using the link in my signature so we can take a closer look?

    Thank you.
     
Loading...

Share This Page