Bug #69677 5.6 mysql_install_db on ubuntu 12.04 [ERROR] Can't read from messagefile '/usr
Submitted: 5 Jul 2013 11:07 Modified: 18 Mar 2014 16:44
Reporter: Arnaud Adant Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.6.10 OS:Linux (ubuntu 12.04)
Assigned to: Paul DuBois CPU Architecture:Any
Tags: mysql_install_db, ubuntu

[5 Jul 2013 11:07] Arnaud Adant
Description:
On Ubuntu 12.04 with LAMP modules installed, the standard command for installing a database, mysql_install_db fails with this message :

./scripts/mysql_install_db --basedir=/home/aadant/mysql-5.6.10-linux-x86_65 --datadir=/home/aadant/data

Installing MySQL system tables...2013-06-20 11:39:41 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2013-07-05 11:39:41 22620 [ERROR] Can't read from messagefile '/usr/share/mysql/english/errmsg.sys'

How to repeat:
1. install Ubuntu 12.04 with the LAMP option

2. run mysql_install_db according to the manual with basedir and datadir options.

Suggested fix:
This is not a bug, most likely a documentation feature request.

The problem comes from the fact that the LAMP option installs mysql 5.5.29 with
a configuration file in /etc/mysql/my.cnf

This configuration file contains this line :

lc-messages-dir = /usr/share/mysql

So mysqld reads this standard configuration file and can not read the 5.5 message file in 5.6, leading to this error.

Solutions :

1. pass your configuration file to mysql_install_db

./scripts/mysql_install_db --defaults-file=my.cnf

2. use --no-defaults, not to read other configuration files

./scripts/mysql_install_db --no-defaults --basedir=/home/aadant/mysql-5.6.10-linux-x86_65 --datadir=/home/aadant/data

The manual could document those options.
[18 Mar 2014 16:44] Paul DuBois
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly.

"The manual could document those options."

That's now been done.