Bug #44637 mysql_upgrade --help doesn't mention --defaults-file
Submitted: 4 May 2009 10:47 Modified: 8 May 2009 17:11
Reporter: Susanne Ebrecht Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: General Severity:S3 (Non-critical)
Version:5.1.37 OS:Any
Assigned to: CPU Architecture:Any
Triage: Triaged: D4 (Minor)

[4 May 2009 10:47] Susanne Ebrecht
Description:
$ mysql_upgrade --verbose --help

lots of output but none hint that --defaults-file=FILE will work.

Same in Online documentation.

In reality mysql_upgrade --defaults-file=/home/bla/myinstance/etc/my.cnf works fine.

Seems that only the documentation is lacking here.

How to repeat:
Just install a 5.0 database with a my.cnf in another path then default path.

Install MySQL 5.1 and try to upgrade the 5.0 database.

You will figure out that mysql_upgrade --defaults-file=... works fine but it is just not documented

Suggested fix:
Just add at the mysql_upgrade documentation that --defaults-file is also working.
[8 May 2009 16:00] Paul Dubois
http://dev.mysql.com/doc/refman/5.1/en/mysql-upgrade.html says:

mysql_upgrade supports the options in the following list. It also reads option files (the [mysql_upgrade] and [client] groups) and supports the options for processing them described at Section 4.2.3.2.1, “Command-Line Options that Affect Option-File Handling”.

--defaults-file is one of the options for processing option files. Section 4.2.3.2.1 describes it.
[8 May 2009 17:02] Simon Mudd
Paul I think you're missing the original point I made with Susanne.

This is all nice and fine when you are running a single mysqld instance on a server. When running multiple instances you are likely to only upgrade a single server at a time. How you reach the right server is extremely critical and the mysql_upgrade does not make it clear WHICH instance it is talking to.

The documentation does not warn that potentially you can make mistakes.

In our installation we make heavy use of several user ".my.cnf" files and thus rarely type the user/pass/host we talk to.  So saying it's in the documentation is fine but when you look at the man page it is not obvious if this option exists.

So it was not obvious to me.
[8 May 2009 17:11] Sergei Golubchik
compare the output with mysql --help
[11 May 2009 11:13] Susanne Ebrecht
Just to point it out here:

mysql_upgrade --help
mysql_upgrade --verbose --help

There is none hint that you are able to use --defaults-file.