Bug #19400 mysql_upgrade could really use "password" from the options file
Submitted: 27 Apr 2006 11:08 Modified: 26 Jul 2006 14:54
Reporter: Christian Hammers (Silver Quality Contributor) (OCA) Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Server Severity:S4 (Feature request)
Version:5.0.20a OS:Linux (Debian GNU/Linux)
Assigned to: Magnus Blåudd CPU Architecture:Any

[27 Apr 2006 11:08] Christian Hammers
Description:
mysql_upgrade should be able to use a password from an options file to make automated
upgrades e.g. in Linux distributions more easy.

Attached you will find a patch that solves this.

BTW: Is there any reason not to use the group [client], too? If admins or distributions already have an options file that is used for automated tasks like nightly checks,
backups or upgrades then it will probably in the client section. Adding it to [mysqld] and [mysql_upgrade] should make no harm, or?

bye,

-christian-

How to repeat:
...

Suggested fix:
see attached patch
[27 Apr 2006 11:09] Christian Hammers
Adds --password to mysql_upgrade. Only quick tested!

Attachment: mysql_upgrade-password.diff (text/plain), 1.53 KiB.

[27 Apr 2006 11:40] Valeriy Kravchuk
Looks like a reasonable feature request to me.
[26 Jul 2006 14:54] Magnus Blåudd
As of MySQL 5.0.23, mysql_upgrade an executable binary has replaced mysql_upgrade.sh. It is available on all systems and supports the --password option. Thus we will not apply this patch.

[msvensson@shellback client]$ ./mysql_upgrade --help
MySQL utility script to upgrade database to the current server version

  -?, --help          Display this help message and exit.
  -b, --basedir=name  Specifies the directory where MySQL is installed
  -d, --datadir=name  Specifies the data directory
  -#, --debug[=name]  Output debug log
  -T, --debug-info    Print some debug info at exit.
  -f, --force         Continue even if we get an sql-error.
  -p, --password[=name]
                      Password to use when connecting to server. If password is
                      not given it's solicited on the tty.
  -P, --port=name     Port number to use for connection.
  --protocol=name     The protocol of connection (tcp,socket,pipe,memory).
  -S, --socket=name   Socket file to use for connection.
  -u, --user=name     User for login if not current user.
  -v, --verbose       Display more output about the process