From nobody@FreeBSD.org  Thu Jul 18 04:09:42 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	by hub.freebsd.org (Postfix) with ESMTP id DF51C7DD
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 18 Jul 2013 04:09:42 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121])
	by mx1.freebsd.org (Postfix) with ESMTP id D1CF42B2
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 18 Jul 2013 04:09:42 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r6I49fvd021987
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 18 Jul 2013 04:09:41 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r6I49fh4021980;
	Thu, 18 Jul 2013 04:09:41 GMT
	(envelope-from nobody)
Message-Id: <201307180409.r6I49fh4021980@oldred.freebsd.org>
Date: Thu, 18 Jul 2013 04:09:41 GMT
From: Chris H <bsd-lists@1command.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: mysql_upgrade man, and upgrade/install info missing manditory information
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         180624
>Category:       ports
>Synopsis:       databases/mysql55-server: mysql_upgrade man, and upgrade/install info missing mandatory information
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    ale
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jul 18 04:10:00 UTC 2013
>Closed-Date:    Tue Feb 11 13:50:19 UTC 2014
>Last-Modified:  Tue Feb 11 13:50:19 UTC 2014
>Originator:     Chris H
>Release:        8.4-STABLE
>Organization:
>Environment:
FreeBSD udns 8.4-STABLE FreeBSD 8.4-STABLE #3: Tue Jul  2 13:41:21 PDT 2013     root@udns:/usr/obj/usr/src/sys/AMD64  amd64
>Description:
I recently performed an upgrade/update, which required upgrading mysql-server from
mysql-server-5.5.30 --> mysql-server-5.5.32. At the end of the process, the message
indicated it was necessary to perform mysql_ugrade(1). Doing so, led to the following:
mysql_upgrade -u root --verbose
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
FATAL ERROR: Upgrade failed

_extremely_ informative -- no?
So what to do? A quick check of the server, and the databases indicate all appear to
normal. Conclusion; dismiss the mysql_upgrade(1) as being broken, and forget about it.
The man(1) pages reveal nothing pertinent, in fact they are essentially the same page
as: http://dev.mysql.com/doc/refman/5.5/en/mysql-upgrade.html
with one _major_ exception; the user comments at the end. In particular; the one at
the end:
mysql_upgrade -u root -p

The -p makes all the difference. But unlike:
mysql -u root add
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
The omission of the -p does _not_ provide an informative error, as mysql, and all
of it's other utilities _do_.
Please make references to this in both the mysql_upgrade(1) man(1) page && the
install/upgrade message emitted at the end of the install/upgrade.
Additional reference: http://forums.freebsd.org/showthread.php?t=40884

Thank you for all your time, and consideration.

>How-To-Repeat:
Attempt to upgrade mysql-server, or upgrade mysql-client 5.5
>Fix:
print a message after the upgrade has finished, indicating that the options
-u root -p
MUST be used when executing mysql_upgrade.
This information should also be included within the man page(s).


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->ale 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Thu Jul 18 08:35:38 UTC 2013 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=180624 

From: Roger Larsson <roger.larsson@e-gatan.se>
To: bug-followup@freebsd.org, bsd-lists@1command.com
Cc:  
Subject: Re: ports/180624: databases/mysql55-server: mysql_upgrade man, and upgrade/install info missing mandatory information
Date: Wed, 08 Jan 2014 19:35:24 +0100

 This is a multi-part message in MIME format.
 
 --nextPart12992184.97GLsljsgQ
 Content-Transfer-Encoding: 7Bit
 Content-Type: text/plain; charset="us-ascii"
 
 If the database is a Akonadi (KDE) database the above won't be 
 enough. You need to mirror the options given to your mysqld, check 
 with 
 ps aux | grep mysql 
 Copy the options to the mysql_upgrade commands (I did not need '-u 
 root -p' but you might) 
 mysql_upgrade --defaults-
 file=/home/USER/.local/share/akonadi/mysql.conf --
 datadir=/home/USER/.local/share/akonadi/db_data/ --
 socket=/tmp/akonadi-USER.x0Bvxr/mysql.socket 
 I really think the --socket option is the key. 
 
 /RogerL
 
 --nextPart12992184.97GLsljsgQ
 Content-Transfer-Encoding: 7Bit
 Content-Type: text/html; charset="us-ascii"
 
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
 <html><head><meta name="qrichtext" content="1" /><style type="text/css">
 p, li { white-space: pre-wrap; }
 </style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
 <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">If the database is a Akonadi (KDE) database the above won't be enough. You need to mirror the options given to your mysqld, check with </p>
 <pre style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';">ps aux | grep mysql</span> </pre>
 <p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Copy the options to the mysql_upgrade commands (I did not need '-u root -p' but you might) </p>
 <pre style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';">mysql_upgrade --defaults-file=/home/USER/.local/share/akonadi/mysql.conf --datadir=/home/USER/.local/share/akonadi/db_data/ --socket=/tmp/akonadi-USER.x0Bvxr/mysql.socket</span> </pre>
 <p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">I really think the --socket option is the key. </p>
 <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p>
 <p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">/RogerL</p></body></html>
 --nextPart12992184.97GLsljsgQ--
 
State-Changed-From-To: open->closed 
State-Changed-By: ale 
State-Changed-When: Tue Feb 11 13:49:54 UTC 2014 
State-Changed-Why:  
Please open a bug report at mysql.com if you like, not a port issue. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=180624 
>Unformatted:
