Bug #75848 INSTALL-BINARY instructions need updating for mysqld --initialize

Submitted: 10 Feb 2015 17:52 Modified: 8 Apr 2015 15:39
Reporter: Morgan Tocker Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.7.6 OS:Any
Assigned to: Paul DuBois CPU Architecture:Any

[10 Feb 2015 17:52] Morgan Tocker
Description:
Since the release notes state that mysql_install_db is deprecated in 5.7.6 in favour of mysqld --initialize, the INSTALL-BINARY file will need updating.

There are a few other corrections worth making:

* There is a link to http://dev.mysql.com/doc/refman/5.6/en/server-default-configuration-file.html - which has no 5.7 counterpart.  It is in reference to the my-huge, my-large etc config files which are no longer maintained.
* The 5.7 install on windows is now over 300M
* The examples from mysqlshow include the test database.  I've removed this and a sentence describing it as usually there.  I've included sys and performance_schema in examples.
* The mysqlshow example selecting from mysql.db will be empty by default.  I've changed it to select from mysql.user

How to repeat:
see INSTALL-BINARY

Suggested fix:
morgo@Rbook:/usr/local/mysql$ diff -ruN INSTALL-BINARY INSTALL-BINARY.new
--- INSTALL-BINARY	2015-02-09 07:31:12.000000000 -0500
+++ INSTALL-BINARY.new	2015-02-10 12:47:13.000000000 -0500
@@ -54,7 +54,7 @@
    Warning

    MySQL has a dependency on the libaio library. The
-   mysql_install_db and subsequent mysqld_safe steps will fail
+   install and subsequent mysqld_safe steps will fail
    if this library is not installed locally. If necessary,
    install it using the appropriate package manager. For
    example, on Yum-based systems:
@@ -83,7 +83,6 @@
    man Unix manual pages
    include Include (header) files
    lib Libraries
-   bin mysql_install_db
    share Miscellaneous support files, including error messages,
    sample configuration files, SQL for database installation
    sql-bench Benchmarks
@@ -105,20 +104,18 @@
 shell> cd mysql
 shell> chown -R mysql .
 shell> chgrp -R mysql .
-shell> bin/mysql_install_db --user=mysql
+shell> bin/mysqld --initialize --user=mysql
 shell> chown -R root .
 shell> chown -R mysql data
 shell> bin/mysqld_safe --user=mysql &
 # Next command is optional
 shell> cp support-files/mysql.server /etc/init.d/mysql.server

-   mysql_install_db creates a default option file named my.cnf
+   Invoking bin/mysqld --initialize creates a default option file named my.cnf
    in the base installation directory. This file is created from
    a template included in the distribution package named
-   my-default.cnf. For more information, see Using a Sample
-   Default Server Configuration File
-   (http://dev.mysql.com/doc/refman/5.6/en/server-default-config
-   uration-file.html).
+   my-default.cnf. For more information on configuring, please consult the manual:
+   (http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html).

    A more detailed version of the preceding description for
    installing a binary distribution follows.
@@ -498,17 +495,17 @@

      * Full: Bundles all of the MySQL products (including the
-       MySQL server). The file' size is over 200MB, and its name
+       MySQL server). The file' size is over 300MB, and its name
        has the form mysql-installer-community-VERSION.N.msi
        where VERSION is the MySQL Server version number such as
-       5.6 and N is the package number, which begins at 0.
+       5.7 and N is the package number, which begins at 0.

      * Web: Only contains the Installer and configuration files,
        and it only downloads the MySQL products you choose to
        install. The size of this file is about 2MB; the name of
        the file has the form
        mysql-installer-community-web-VERSION.N.msi where VERSION
-       is the MySQL Server version number such as 5.6 and N is
+       is the MySQL Server version number such as 5.7 and N is
        the package number, which begins at 0.

 Installer editions
@@ -646,7 +643,7 @@
    some of the recently installed MySQL products. The
    Configuration Overview window displays the progress and then
    loads a configuration window, if required. Our example
-   configures MySQL Server 5.6.x.
+   configures MySQL Server 5.7.x.

 Configuring MySQL Server

@@ -2441,13 +2438,12 @@
 +--------------------+
 | information_schema |
 | mysql              |
-| test               |
+| performance_schema |
+| sys                |
 +--------------------+

    The list of installed databases may vary, but will always
-   include the minimum of mysql and information_schema. In most
-   cases, the test database will also be installed
-   automatically.
+   include the minimum of mysql and information_schema.

    The preceding command (and commands for other MySQL programs
    such as mysql) may not work if the correct MySQL account does
@@ -2467,7 +2463,8 @@
 +--------------------+
 | information_schema |
 | mysql              |
-| test               |
+| performance_schema |
+| sys                |
 +--------------------+

    If you specify a database name, mysqlshow displays a list of
@@ -2479,17 +2476,28 @@
 +---------------------------+
 | columns_priv              |
 | db                        |
+| engine_cost               |
 | event                     |
 | func                      |
+| general_log               |
+| gtid_executed             |
 | help_category             |
 | help_keyword              |
 | help_relation             |
 | help_topic                |
-| host                      |
+| innodb_index_stats        |
+| innodb_table_stats        |
+| ndb_binlog_index          |
 | plugin                    |
 | proc                      |
 | procs_priv                |
+| proxies_priv              |
+| server_cost               |
 | servers                   |
+| slave_master_info         |
+| slave_relay_log_info      |
+| slave_worker_info         |
+| slow_log                  |
 | tables_priv               |
 | time_zone                 |
 | time_zone_leap_second     |
@@ -2501,13 +2509,12 @@

    Use the mysql program to select information from a table in
    the mysql database:
-C:\> C:\mysql\bin\mysql -e "SELECT Host,Db,User FROM mysql.db"
-+------+--------+------+
-| host | db     | user |
-+------+--------+------+
-| %    | test   |      |
-| %    | test_% |      |
-+------+--------+------+
+C:\> C:\mysql\bin\mysql -e "SELECT user,host,plugin,password_expired FROM mysql.user"
++------+-----------+-----------------------+------------------+
+| user | host      | plugin                | password_expired |
++------+-----------+-----------------------+------------------+
+| root | localhost | mysql_native_password | N                |
++------+-----------+-----------------------+------------------+

    For more information about mysqlshow and mysql, see Section
    4.5.6, "mysqlshow --- Display Database, Table, and Column
[10 Feb 2015 17:52] Morgan Tocker
INSTALL-BINARY with changes

Attachment: INSTALL-BINARY.new (application/octet-stream, text), 100.60 KiB.

[12 Feb 2015 4:54] MySQL Verification Team
Hello Morgan,

Thank you for the report and contribution.

Thanks,
Umesh
[19 Mar 2015 13:30] Paul DuBois
This is premature for 5.7.6 because the the Windows installers still create the test database, use the prebuilt data directory, and don't use mysqld --initialize.

I'll leave the bug report open because the installer will be updated for 5.7.7 as I understand it.
[6 Apr 2015 18:24] Morgan Tocker
I just noticed that the advice on mysqld_safe might be out of date on systemd platforms too.  Will need double checking.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.058 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.