Bug #80857 DATADIR is not set /usr/local/var at 5.5 and later
Submitted: 25 Mar 2016 8:08 Modified: 4 Apr 2016 14:28
Reporter: Tsubasa Tanaka (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.5, 5.6, 5.7 OS:Linux
Assigned to: CPU Architecture:Any

[25 Mar 2016 8:08] Tsubasa Tanaka
Description:
Docs describe "Typically, DATADIR is /usr/local/mysql/data for a binary installation or /usr/local/var for a source installation."

But /usr/local/var is not used source installation of 5.5 and later (5.1 and earlier was used)

How to repeat:
Extract source-tarball which is 5.5 and later, and into it,

```
$ cmake .
$ make
$ sql/mysqld --no-defaults --help --verbose | grep datadir
..
datadir                                           /usr/local/mysql/data/

$ grep INSTALL_MYSQLDATADIR CMakeCache.txt
INSTALL_MYSQLDATADIR:STRING=data
//ADVANCED property for variable: INSTALL_MYSQLDATADIR
INSTALL_MYSQLDATADIR-ADVANCED:INTERNAL=1
```

Or I can see it at install_layout.cmake (search "MYSQLDATADIR")

https://github.com/mysql/mysql-server/blob/5.7/cmake/install_layout.cmake
https://github.com/mysql/mysql-server/blob/5.6/cmake/install_layout.cmake
https://github.com/mysql/mysql-server/blob/5.5/cmake/install_layout.cmake

Suggested fix:
Fix docs.
Remove about "/usr/local/var" in the sentence.
[25 Mar 2016 8:14] Tsubasa Tanaka
I'm sorry, I forgot to point doc's URL...

https://dev.mysql.com/doc/refman/5.7/en/option-files.html
https://dev.mysql.com/doc/refman/5.6/en/option-files.html
https://dev.mysql.com/doc/refman/5.5/en/option-files.html
https://dev.mysql.com/doc/refman/5.6/ja/option-files.html
[25 Mar 2016 20:13] MySQL Verification Team
Thank you for the bug report.
[4 Apr 2016 14:28] 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.