mysql-server-5.7.postinst is influenced by ~/.my.cnf, causing installation hangs

Bug #1567696 reported by Robie Basak
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
mysql-5.7 (Ubuntu)
Fix Released
Critical
Unassigned

Bug Description

Related bug: bug 1567696. This bug is to track that we are influenced by ~/.my.cnf, not specifically $HOME.

mysql-server-5.7 version: 5.7.11-0ubuntu4

Steps to reproduce:

sudo -i

Ensure $HOME is /root

cat > ~/.my.cnf <<EOT
[client]
user = root
password = foo
EOT

sudo apt-get install -y mysql-server-5.7

Every time (three times) it prompts for a root password, just press Enter (ie.
set a blank password).

Expected behaviour: apt-get finishes.

Actual behaviour:

mysql-server-5.7.postinst hangs on:

update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode

/var/log/mysql/error.log reports:

2016-04-07T23:12:37.299093Z 0 [Note] Execution of init_file '/var/lib/mysql-files/tmp.LTuPIaNrV0' started.
2016-04-07T23:12:37.299499Z 1 [ERROR] 1524 Plugin 'auth_socket' is not loaded
2016-04-07T23:12:37.299577Z 0 [Note] Execution of init_file '/var/lib/mysql-files/tmp.LTuPIaNrV0' ended.
2016-04-07T23:12:37.299631Z 0 [Note] mysqld: ready for connections.
Version: '5.7.11-0ubuntu5' socket: '/tmp/tmp.FFBBqKBiRF/mysqld.sock' port: 3306 (Ubuntu)

Workaround:

Delete or rename away ~root/.my.cnf.

Robie Basak (racb)
Changed in mysql-5.7 (Ubuntu):
milestone: none → ubuntu-16.04
description: updated
Revision history for this message
Robie Basak (racb) wrote :

This was fixed in 5.7.11-0ubuntu6.

Changed in mysql-5.7 (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.