Missing my-default.cnf Failing mysql_install_db

Bug #1523656 reported by Krzysztof Adamski
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
mysql-5.6 (Ubuntu)
Invalid
Medium
Unassigned
Trusty
Won't Fix
Undecided
Unassigned
Xenial
Invalid
Undecided
Unassigned
mysql-5.7 (Ubuntu)
Fix Released
Undecided
Unassigned
Trusty
Invalid
Undecided
Unassigned
Xenial
Fix Released
Undecided
Unassigned

Bug Description

Default installation of "5.6.27-0ubuntu0.14.04.1 (Ubuntu)" does not contain my-default.cnf. Because of that I can't run

host:/usr/bin$ mysql_install_db
FATAL ERROR: Could not find my-default.cnf

If you compiled from source, you need to run 'make install' to
copy the software into the correct location ready for operation.

If you are using a binary release, you must either be at the top
level of the extracted archive, or pass the --basedir option
pointing to that location.

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in mysql-5.6 (Ubuntu):
status: New → Confirmed
Revision history for this message
Tom importepeu (aliasprotect-ubuntu) wrote :

Hi,

We're using mysql-server 5.6 on Ubuntu Server 14.04.01. The package version is 5.6.27-0ubuntu0.14.04.1. I saw that this bug was fixed in release 5.6.23 but this bug also appears with 5.6.27 :
--
$ mysql_install_db --datadir=/home/mysql/data --basedir=/usr --keep-my-cnf
FATAL ERROR: Could not find my-default.cnf

If you compiled from source, you need to run 'make install' to
copy the software into the correct location ready for operation.

If you are using a binary release, you must either be at the top
level of the extracted archive, or pass the --basedir option
pointing to that location.
--
Indeed a my-defaut.cnf file exists in the package at /usr/share/doc/mysql-server-5.6/examples/my-default.cnf which is not parsed by the find_in_basedir function of mysql_install_db perl script :
my $cfg_template= find_in_basedir($opt,"file","my-default.$cnfext",
                                  ".", "share","share/mysql","support-files");

This file is supposed to exist in /usr/share/mysql which is not in mysql-server-5.6 package release 5.6.27-0ubuntu0.14.04.1
Regards,
Tom.

Revision history for this message
Robie Basak (racb) wrote :

Thanks Tom and Krzysztof, this report is helpful.

Changed in mysql-5.6 (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → Medium
Revision history for this message
Robie Basak (racb) wrote :

This has been fixed in mysql-server-core-5.7 in 16.04 onwards. my-default.cnf is shipped now. I don't think we intend to fix this in 14.04, as the workaround is trivial.

Changed in mysql-5.7 (Ubuntu):
status: New → Fix Released
Changed in mysql-5.7 (Ubuntu Trusty):
status: New → Invalid
Changed in mysql-5.7 (Ubuntu Xenial):
status: New → Fix Released
Changed in mysql-5.6 (Ubuntu Xenial):
status: New → Invalid
Changed in mysql-5.6 (Ubuntu Trusty):
status: New → Won't Fix
Changed in mysql-5.6 (Ubuntu):
status: Triaged → Invalid
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.