Bug #36558 mysql_upgrade options --basedir --datadir are deprecated
Submitted: 7 May 2008 10:16 Modified: 7 Aug 2009 0:11
Reporter: Roland Bouman Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Installing Severity:S3 (Non-critical)
Version:5.1.? OS:Any
Assigned to: Jim Winstead CPU Architecture:Any

[7 May 2008 10:16] Roland Bouman
[2008-05-07 12:09] <roland> stefan: I just heard that options --basedir and --datadir for mysql_upgrade are now deprecated...however it is not documented and I never heard any discussion about this...do you know anything? 
[2008-05-07 12:09] <stefan> roland: No, I haven't heard that either.
[2008-05-07 12:09] <stefan> How did you find out?
[2008-05-07 12:10] <roland> stefan: running the program
[2008-05-07 12:11] <roland> stefan: I should say, I heard it second hand...haven't tried it.
[2008-05-07 12:11] <stefan> Hehe. Please file a bug report, set it to verified and assign it to Paul. Thanks!
[2008-05-07 12:11] <roland> stefan: but may be this is an accident? 
[2008-05-07 12:12] <stefan> That happens quite often with options. "Why tell anyone? They'll find out sooner or later, anyway."
[2008-05-07 12:14] <roland> ok

How to repeat:
run mysql_upgrade

Suggested fix:
document deprecation
[7 May 2008 11:32] MySQL Verification Team
Thank you for the bug report.
[7 May 2008 13:37] Stefan Hinz
This bug needs to be assigned to a developer who can supply the necessary information. Then it can be reclassified as a docs bug when the information has been supplied in the bug report.
[19 Jun 2008 11:21] Geert Vanderkelen
The --datadir should not be deprecated!!!!!

I just ran into the situation that I wanted to do a mysql_upgrade on a MySQL 5.0 data-directory. So I did:
  ./bin/mysql_upgrade --datadir=/opt/mysql/data/mysql50

It failed, and lucky I didn't have write permissions on /var/mysql (datadir of 5.1)!

Bring back --datadir option or give --defaults-file option in 5.0 too!
[19 Jun 2008 11:43] Geert Vanderkelen
./bin/mysql_upgrade_shell on the other hand is totally not documented ..
[23 Jun 2008 16:19] Sveta Smirnova
$mysql_upgrade --help
/path/mysql-5.1/bin/mysql_upgrade  Ver 1.1 Distrib 5.1.27, for apple-darwin8.11.1 (i686)
MySQL utility for upgrading databases to new MySQL versions
  -b, --basedir=name  Not used by mysql_upgrade. Only for backward compatibilty
  -d, --datadir=name  Not used by mysql_upgrade. Only for backward compatibilty
[23 Jun 2008 16:25] Sveta Smirnova
Even worse if running mysql_upgrade with --datadir and --basedir options it just ignores them and does not print any message they are not used.
[11 Dec 2008 14:58] Sveta Smirnova
Bug #41394 was marked as duplicate of this one.
[19 May 2009 17:40] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:


2902 Jim Winstead	2009-05-19
      mysql_upgrade ignored the --basedir and --datadir arguments as it has no use
      for them, but it did so silently. (Bug #36558)
[19 May 2009 17:43] Jim Winstead
The options aren't really deprecated (they won't be going away), they are just ignored so that their presence in the [client] section of my.cnf doesn't cause mysql_upgrade to blow up. The patch adds a warning about them being ignored.
[14 Jul 2009 17:21] Jim Winstead
Pushed to 5.1-bugteam and mysql-pe.
[4 Aug 2009 19:51] Bugs System
Pushed into 5.4.4-alpha (revid:alik@sun.com-20090804194615-h40sa098mx4z49qg) (version source revid:jimw@mysql.com-20090714171651-ziq080rkon3u244l) (merge vers: 5.4.4-alpha) (pib:11)
[4 Aug 2009 20:45] Bugs System
Pushed into 5.1.38 (revid:davi.arnaut@sun.com-20090804204317-ggodqkik7de6nfpz) (version source revid:davi.arnaut@sun.com-20090804204317-ggodqkik7de6nfpz) (merge vers: 5.1.38) (pib:11)
[7 Aug 2009 0:11] Paul DuBois
Noted in 5.1.38, 5.4.4 changelogs.

mysql_upgrade silently ignored the --basedir and --datadir options,
which it accepts for backward compatibility. Now it prints a warning.
[12 Aug 2009 22:56] Paul DuBois
Noted in 5.4.2 changelog because next 5.4 version will be 5.4.2 and not 5.4.4.
[15 Aug 2009 2:14] Paul DuBois
Ignore previous comment about 5.4.2.
[1 Oct 2009 5:59] Bugs System
Pushed into 5.1.39-ndb-6.3.28 (revid:jonas@mysql.com-20091001055605-ap2kiaarr7p40mmv) (version source revid:jonas@mysql.com-20091001055605-ap2kiaarr7p40mmv) (merge vers: 5.1.39-ndb-6.3.28) (pib:11)
[1 Oct 2009 7:25] Bugs System
Pushed into 5.1.39-ndb-7.0.9 (revid:jonas@mysql.com-20091001072547-kv17uu06hfjhgjay) (version source revid:jonas@mysql.com-20091001071652-irejtnumzbpsbgk2) (merge vers: 5.1.39-ndb-7.0.9) (pib:11)
[1 Oct 2009 13:25] Bugs System
Pushed into 5.1.39-ndb-7.1.0 (revid:jonas@mysql.com-20091001123013-g9ob2tsyctpw6zs0) (version source revid:jonas@mysql.com-20091001123013-g9ob2tsyctpw6zs0) (merge vers: 5.1.39-ndb-7.1.0) (pib:11)
[5 Oct 2009 10:50] Bugs System
Pushed into 5.1.39-ndb-6.2.19 (revid:jonas@mysql.com-20091005103850-dwij2dojwpvf5hi6) (version source revid:jonas@mysql.com-20090930185117-bhud4ek1y0hsj1nv) (merge vers: 5.1.39-ndb-6.2.19) (pib:11)
[8 Oct 2009 20:35] Paul DuBois
The 5.4 fix has been pushed to 5.4.2.