my.cnf includedir not working as expected

Bug #136225 reported by noah
2
Affects Status Importance Assigned to Milestone
mysql-dfsg-5.0 (Ubuntu)
Fix Released
Wishlist
Unassigned
Declined for Gutsy by Henrik Nilsen Omma

Bug Description

The last lines in /etc/mysql/my.cnf (Gutsy) says
#
# * IMPORTANT: Additional settings that can override those from this file!
#
!includedir /etc/mysql/conf.d/

I want MySQL running with UTF-8, hence:

1/
# printf "[mysqld]\ncharacter-set-server=utf8\ndefault-character-set=utf8\n" > /etc/mysql/conf.d/huhu

2/
# /etc/init.d/mysql restart
 * Stopping MySQL database server mysqld
   ...done.
 * Starting MySQL database server mysqld
   ...done.
 * Checking for corrupt, not cleanly closed and upgrade needing tables.

3/
# mysql -uroot -Bse 'SHOW VARIABLES LIKE "char%"'
character_set_client latin1
character_set_connection latin1
character_set_database latin1
character_set_filesystem binary
character_set_results latin1
character_set_server latin1
character_set_system utf8
character_sets_dir /usr/share/mysql/charsets/

4/
Didn't work, character_set_server should've been utf8.

What works is the following:
1/
Edit /etc/mysql/my.cnf and add this right below [mysqld]
character-set-server = utf8
default-character-set = utf8

2/
# /etc/init.d/mysql restart
 * Stopping MySQL database server mysqld
   ...done.
 * Starting MySQL database server mysqld
   ...done.
 * Checking for corrupt, not cleanly closed and upgrade needing tables.

3/
# mysql -uroot -Bse 'SHOW VARIABLES LIKE "char%"'
character_set_client latin1
character_set_connection latin1
character_set_database utf8
character_set_filesystem binary
character_set_results latin1
character_set_server utf8
character_set_system utf8
character_sets_dir /usr/share/mysql/charsets/

More info:
# dpkg -l |grep mysql
ii libdbd-mysql-perl 4.004-2 A Perl5 database interface to the MySQL data
ii libmysqlclient15off 5.0.45-1ubuntu2 MySQL database client library
ii mysql-client-5.0 5.0.45-1ubuntu2 MySQL database client binaries
ii mysql-common 5.0.45-1ubuntu2 MySQL database common files
ii mysql-server-5.0 5.0.45-1ubuntu2 MySQL database server binaries
ii php5-mysql 5.2.3-1ubuntu4 MySQL module for php5

Revision history for this message
Basilio Kublik (sourcercito) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. This bug did not have a package associated with it, which is important for ensuring that it gets looked at by the proper developers. You can learn more about finding the right package at [WWW] https://wiki.ubuntu.com/Bugs/FindRightPackage. I have classified this bug as a bug in mysql-dfsg-5.0

Revision history for this message
Soren Hansen (soren) wrote : Re: [Bug 136225] my.cnf includedir not working as expected

It seems this is more of a documentation problem, actually. The files in
conf.d must have a '.cnf', otherwise they'll be ignored.

So to fix this, we should add a comment in /etc/mysql/my.cnf near the
!include directive about this idiosyncrasy. Would you like to do that,
Noah?

 status confirmed

--
Soren Hansen
Ubuntu Server Team
http://www.ubuntu.com/

Changed in mysql-dfsg-5.0:
status: New → Confirmed
Mathias Gug (mathiaz)
Changed in mysql-dfsg-5.0:
importance: Undecided → Wishlist
status: Confirmed → Triaged
Chuck Short (zulcss)
Changed in mysql-dfsg-5.0:
status: Triaged → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mysql-dfsg-5.0 - 5.0.51-3ubuntu1

---------------
mysql-dfsg-5.0 (5.0.51-3ubuntu1) hardy; urgency=low

  [Mathias Gug]
  * Merge from debian unstable, remaining changes:
    - debian/control:
      - Set Maintainer to Ubuntu Core dev. Move Debian maintainer
        to XSBC-Original-Maintainer.
      - Add mysql-doc-5.0 as a Suggests to mysql-client-5.0, mysql-server-5.0
        and libmysqlclient15-dev.
    - debian/rules: Apply same configuration options on lpia as for i386.
  * debian/control:
    - Preprend XS-Original- to Vcs-{Browser,Svn}.
  * debian/rules:
    - Support DEB_BUILD_OPTIONS option 'nocheck' to skip tests.
  * Dropped patches:
    - debian/patches/91_bug29389.dpatch:
        fix for mysql bug 27383 which causes mysql-test 'mysql_client_test'
        to fail due to gcc 4.x optimizations.
    - debian/libmysqlclient15-dev.files, debian/mysql-client-5.0.files,
      debian/mysql-server-5.0.files: man pages are GPLed now.
  * Improved error message when unable to connect using debian-sys-maint. (LP:
    #153868)

  [Chuck Short]
  * Replcaed --with-comment="Debian" with --with-comment="Ubuntu" in debian/rules (LP: #134384)
  * Added note about the "/etc/mysql/conf.d" directory in my.cnf (LP: #136225)
  * Fixed mysqlhotcopy failure. (LP: #162393)
  * Fixed mysqlslowdump usage. Added patch from Arnold Daniels <email address hidden>. (LP: #183762)

 -- Mathias Gug <email address hidden> Fri, 25 Jan 2008 04:10:49 -0500

Changed in mysql-dfsg-5.0:
status: In Progress → 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.