Re: Ubuntu MySQL install with Virtualmin - password problems with 16.04.4 server

From: The Natural Philosopher <tnp_at_invalid.invalid>
Date: Fri, 30 Mar 2018 12:34:32 +0100
Message-ID: <p9l7cu$tmi$1_at_dont-email.me>


On 30/03/18 12:07, The Natural Philosopher wrote:
> On 30/03/18 10:42, Axel Schwenke wrote:

>> On 29.03.2018 22:02, J.O. Aho wrote:
>>> On 03/29/18 20:09, Abandoned Trolley wrote:
>>>
>>>> I don't understand how it is that I can assign a root password as part
>>>> of the Virtualmin install, which Virtualmin then uses to administer the
>>>> database - but I cannot use that same password to log in, even at the
>>>> console.
>>>
>>> I would say bad design, the password is only for their front end and
>>> they leave the database without root password
>>
[Quoted] >> I don't think that this is correctly deduced. MySQL ships (for quite some
>> time now) with the auth_socket plugin [1] enabled and uses it for the
>> default "root_at_localhost" account. That means for connecting to MySQL 
>> as root
>> you don't need any password - when you run the "mysql" command as user 
>> root.
>>
>> *I* think that Virtualmin just isn't aware of that. It asks for a 
>> password
>> that is never needed.
>>
>>
>> [1] 
>> https://dev.mysql.com/doc/refman/5.7/en/socket-pluggable-authentication.html 
>>
>>

>
> On an ubuntu install in January:
>
> vps1:~$ su -
> Password:
> vps1:~# mysql
> ERROR 1045 (28000): Access denied for user 'root'_at_'localhost' (using
> password: NO)
> vps1:~#
>
> So it appears you are 100% wrong?
>
>
>

Also with respect to my installation which is bog standard Ubuntu mysql 5.7.21

# lsb_release -a
No LSB modules are available.

Distributor ID:	Ubuntu
Description:	Ubuntu 17.10
Release:	17.10
Codename:	artful


# mysql --version
mysql Ver 14.14 Distrib 5.7.21, for Linux (x86_64) using EditLine wrapper

  • the file quoted in the doc page you cite "my.cnf" does not exist
  • the actual server config file is /etc/mysql/mysql.conf.d/mysqld.cnf
  • it contains no references to 'auth' whatsoever under the [mysqld] section.

And running he sample code suggested by that documentation gives an empty result:

[Quoted] mysql> SELECT PLUGIN_NAME, PLUGIN_STATUS

     ->        FROM INFORMATION_SCHEMA.PLUGINS
     ->        WHERE PLUGIN_NAME LIKE '%socket%';

Empty set (0.10 sec)

Which demonstrates at least on Ubuntu that "the auth_socket plugin [1] enabled and uses it for the default "root_at_localhost" account" is a false statement.

Mysql may well ship with it by default but that is no guarantee that a given distro will not completely reorganise the default configuration..

-- 
“It is hard to imagine a more stupid decision or more dangerous way of 
making decisions than by putting those decisions in the hands of people 
who pay no price for being wrong.”

Thomas Sowell
Received on Fri Mar 30 2018 - 13:34:32 CEST

Original text of this message