dbconfig-mysql sets blank port in config

Bug #1563274 reported by Lars Tangvald
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
dbconfig-common (Debian)
Fix Released
Unknown
dbconfig-common (Ubuntu)
Fix Released
Undecided
Norvald H. Ryeng
mysql-5.7 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

For non-remote setups, dbconfig will not set a port value, leaving it blank in generated option files.

MySQL 5.7 will no longer accept a blank port option in the config file (See https://github.com/mysql/mysql-server/commit/3d8b4570d1a9d8d03d32e4cd6705b6a2d354e992 for more information about the change).

If the port is not to be changed it should either be set to 3306 or the line omitted from the generated file.
The former is probably the better option, since other packages (e.g. redmine) use dbconfig variables for their own config generation.

Revision history for this message
Lars Tangvald (lars-tangvald) wrote :

As this isn't a simple fix, and is currently blocking MySQL 5.7 in Ubuntu 16, we will patch MySQL to allow the empty port option for now (it will print a warning instead of the error).

There's also a related upstream bug at http://bugs.mysql.com/bug.php?id=80903

Robie Basak (racb)
tags: added: mysql-5.7-transition
Revision history for this message
Robie Basak (racb) wrote :

This was fixed in 5.7.11-0ubuntu3 by permitting blank port values again, which I believe will also be done upstream. So the mysql-5.7 task can be closed. the dbconfig-common task remains open because this should be fixed there to not use empty port values at all.

Changed in mysql-5.7 (Ubuntu):
status: New → Fix Released
tags: added: needs-upstream-report
Revision history for this message
Lars Tangvald (lars-tangvald) wrote :

Note that this will stop working again in future MySQL versions, so it needs to be fixed.

Robie Basak (racb)
Changed in dbconfig-common (Ubuntu):
milestone: none → ubuntu-16.05
assignee: nobody → Norvald H. Ryeng (nryeng)
Revision history for this message
Paul Gevers (paul-climbing) wrote :

Not sure why this bug doesn't show up in my inbox, but Norvald, please lets align on how this is to be fixed. After I finish handling bug 1578144, I intend to fix this issue as well (straight in Debian).

Changed in dbconfig-common (Debian):
status: Unknown → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in dbconfig-common (Ubuntu):
status: New → Confirmed
Changed in dbconfig-common (Debian):
status: Confirmed → Fix Committed
Changed in dbconfig-common (Debian):
status: Fix Committed → Fix Released
Revision history for this message
Paul Gevers (paul-climbing) wrote :

Fix was included in 2.0.5

Changed in dbconfig-common (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
ripa (rvdesai) wrote :

How do I find this fix??
I am getting an error 2002 while upgrading ubuntu 14.04 to 16.04...Please give me right direction to solve this error?

It says that mysql :Empty value for port is specified. Will throw an error in future versions Error 2002 (HY000): Can't connect through local MySQL Server through socket '/var/run//mysqld/mysqld.sock'

Fortunately,
/var/cache/dbconfig-common/backups/phpmyadmin_4:4.0.10-1.2017-05-24-15.0
2.22 should hold a backup of database, made just before the upgrade.

Revision history for this message
Paul Gevers (paul-climbing) wrote :

@ripa, find the configuration file of phpmyadmin (I guess /etc/phpmyadmin/*.conf) and add the port.

Revision history for this message
Petr_Kosv (karrrolina) wrote :

Wishing to install phpmyadmin on 16.04. And cannot use debian's dbconfig-common 2.0.5-2.0.8 alongside ubuntu's packages. Do I need to downgrade from mysql 5.7.22 to 5.7.11 (it's two years down)?

Revision history for this message
Petr_Kosv (karrrolina) wrote :

Is downgrading phpmyadmin, the current 4.5.4.1ubuntu2 does not finish installation, an option for me?

Revision history for this message
Paul Gevers (paul-climbing) wrote :

I haven't checked, but if MySQL was updated in 16.04 with a version that doesn't support blank ports anymore, I think you should request dbconfig-common to be updated in 16.04 also to not create configurations with blank ports.

Revision history for this message
Petr_Kosv (karrrolina) wrote :
Revision history for this message
Lars Tangvald (lars-tangvald) wrote :

5.7.22 (in Ubuntu 16.04) still supports the empty port value, so I don't think the issue is really related to this.
The "empty value specified" message is basically a deprecation warning in 5.7, but changed to error in 8.0

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.