Bug #73264 Data directory wrong in my.cnf after install
Submitted: 10 Jul 2014 19:07 Modified: 11 Aug 2014 10:48
Reporter: Sean McLaughlin Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: Installing Severity:S3 (Non-critical)
Version:5.6.14 OS:Linux
Assigned to: CPU Architecture:Any

[10 Jul 2014 19:07] Sean McLaughlin
Description:
I installed mysql 5.6.14 from source and the location in /etc/my.cnf was different than where the files were installed.  The data directory was put in /usr/local/mysql, but the conf file installed from make install, pointed to /var/lib/mysql.  Took some time to notice, the error would just say the mysql.user table didn't exist.

How to repeat:
Do an install of mysql 5.6.14

Suggested fix:
I will leave the up to you.
[11 Jul 2014 10:48] Umesh Shastry
Thank you for the report.
I could not see this issue with a fresh build on my test machine.

By default, when you install MySQL after compiling it from source, the installation step installs files under /usr/local/mysql and the component locations under the installation directory are the same as for binary distributions, see http://dev.mysql.com/doc/refman/5.6/en/binary-installation.html#binary-installation-layout

I suspect that the conf file is leftover from previous rpm installation( rpm installation's layout for datadir is /var/lib/mysql) - http://dev.mysql.com/doc/refman/5.6/en/linux-installation-rpm.html#mysql-installation-layo...

You can  use the  -DSYSCONFDIR=dir_name option with cmake while compiling the source to decide my.cnf option file directory.

This location cannot be set at server startup, but you can start the server with a given option file using the --defaults-file=file_name option, where file_name is the full path name to the file.

Please http://dev.mysql.com/doc/refman/5.6/en/source-configuration-options.html
[12 Aug 2014 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".