← Back to team overview

maria-discuss team mailing list archive

Re: MariaDB upgrade 10.1 to 10.2 CentOS7

 

Hi Karthick,


On 11/13/2017 03:30 PM, Karthick Subramanian wrote:
Hi Elena,

Do you think the yum update causing issue instead of yum remove and yum install in the first place. Please advise.

No, I don't see how the failed yum update could possibly cause this. The failure itself upon yum update is easily reproducible and sadly expected, currently major upgrades of the server package are not supported. It does not cause the magic appearance of unix_socket in the root configuration. I tried it just in case, in different variations (hence the delay with the answer), and it does nothing of the kind.

There is a known easy way to get this problem. If your 10.1.18 was installed from the *enterprise* set of packages, it would have had exactly this configuration, single local root with unix_socket and the plugin linked statically and enabled. Then, after you switch to the community 10.2 server, it of course preserves the datadir, including user configuration, but it does not have the statically linked plugin; it's a dynamic library there, not loaded by default. So, when you start the server, you can't connect.

At first it seemed to contradict the output you pasted in the initial email:

>             In my previous version:
>
>             select user, plugin from mysql.user;
>
>             +-----------+------+-------------+
>             | Host      | User | plugin      |
>             +-----------+------+-------------+
>             | localhost | root |                |
>             ------------------------------------

It reads as if that's what you had on 10.1. But after your last lists of RPM packages I'm not so sure. If this is *not* the output from the 10.1 server before the upgrade, then the explanation above is by far the most likely one.

If you are sure that's the output from 10.1 before the upgrade, the next question is how reliable it is. It is obviously edited, but unclear to which extent.


Regards,
Elena



On Nov 13, 2017 5:13 PM, "Karthick Subramanian" <ksubramanian@xxxxxxxxxxxxxxx <mailto:ksubramanian@xxxxxxxxxxxxxxx>> wrote:

    Hi Elena,

    [root@one server ~]# rpm -qa | grep -iE 'mariadb|mysql'
    MariaDB-client-10.2.9-1.el7.centos.x86_64
    MariaDB-compat-10.2.9-1.el7.centos.x86_64
    MariaDB-common-10.2.9-1.el7.centos.x86_64
    MariaDB-server-10.2.9-1.el7.centos.x86_64

    [root@another server~]#  rpm -qa | grep -iE 'mariadb|mysql'
    pcp-pmda-mysql-3.10.6-2.el7.x86_64
    MariaDB-client-10.2.10-1.el7.centos.x86_64
    MariaDB-server-10.2.10-1.el7.centos.x86_64
    MariaDB-common-10.1.18-1.el7.centos.x86_64



    Steps:

    I did the upgrade in two servers:

    In both servers (both 10.1), I follow the below steps and got ssame
    unix-socket not loaded error.

    set-up repo:

    curl -sShttps://downloads.mariadb.com/MariaDB/mariadb_repo_setup
    <https://downloads.mariadb.com/MariaDB/mariadb_repo_setup>  | sudo bash

    *yum update MariaDB-server MariaDB-client*

    MariaDB-Client installed successfully, but MariaDB-server thrown
    error that it couldn't update.

    then I remove the mariaDb-Server using below command:

    *yum remove MariaDB-server*

    then install:

    *yum install MariaDB-server*

    then mysql-upgrade:

    I got the error with unix-socket.

    Do you think yum update MariaDB-server caused this issue? Do I need
    to remove and then install, instead of update. Please advise.




    On Mon, Nov 13, 2017 at 4:49 PM, Elena Stepanova
    <elenst@xxxxxxxxxxxxxxxx <mailto:elenst@xxxxxxxxxxxxxxxx>> wrote:

        Hi Karthick,

        On 11/13/2017 11:11 AM, Karthick Subramanian wrote:

            All,

            Did anyone face issues after upgrading the mariadb from 10.1
            to 10.2 to login to root user as shown below:

            mysql -u root

            I got the error - unix_socket not loaded.

            I noticed that the unix_socket authentication is required
            after the upgrade for root login from localhost. Can anyone
            confirm whether this is part of the feature after upgrades.


        This is strange, upgrade to packages *provided by MariaDB*
        shouldn't do it. Packages provided by another party could be a
        different story. Could you please paste the output of rpm -qa |
        grep -iE 'mariadb|mysql' or alike?


            In my previous version:

            select user, plugin from mysql.user;

            +-----------+------+-------------+
            | Host      | User | plugin      |
            +-----------+------+-------------+
            | localhost | root |                |
            ------------------------------------

            After upgrade:

            select user, plugin from mysql.user;

            +-----------+------+-------------+
            | Host      | User | plugin      |
            +-----------+------+-------------+
            | localhost | root | unix_socket |
            ---------------------------------------


        The other way round is more common -- some variations of 10.1
        did set unix_socket authentication for local root and could have
        it enabled by default, and then after upgrade to regular 10.2
        unix_socket would become disabled while root would still require it.

        Is it possible that your previous installation points at a
        different data directory, while the old one that 10.2 now uses
        had this kind of configuration before?

        Regards,
        Elena



            Regards,
            Karthick



            _______________________________________________
            Mailing list: https://launchpad.net/~maria-discuss
            <https://launchpad.net/~maria-discuss>
            Post to     : maria-discuss@xxxxxxxxxxxxxxxxxxx
            <mailto:maria-discuss@xxxxxxxxxxxxxxxxxxx>
            Unsubscribe : https://launchpad.net/~maria-discuss
            <https://launchpad.net/~maria-discuss>
            More help   : https://help.launchpad.net/ListHelp
            <https://help.launchpad.net/ListHelp>




References