Bug #94071 Cannot change the properties of a user in Workbench 8.0014 after upgrade from 8.
Submitted: 26 Jan 2019 12:36 Modified: 29 Jan 2019 16:42
Reporter: Daniel Lewis Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Workbench Severity:S2 (Serious)
Version:8.0014 OS:Ubuntu (18.04.1 (up to date))
Assigned to: CPU Architecture:Other (AMD x86_64)

[26 Jan 2019 12:36] Daniel Lewis
Description:
I upgraded MySQL, Workbook, and Connector J from a repository. All three are version 8.0.14-1ubuntu18.04. Password was set to using the new default (sha2) I had some problems with this, so I wanted to change a user back to the native_default method for a password. I opened Workbook as root. Then in Users and Privileges, I selected the user from User Accounts and tried to make the password change. No luck. So I decided to add a user; clicked Add Account. After entering the login name, Authenticated Type, Standard , and my password twice, I clicked Apply. I got the following error message:

 Error executing 'ALTER USER 'dan'@'localhost' PASSWORD EXPIRE'
Column count of mysql.user is wrong. Expected 51, found 50. Created with MYSQL 80013, now running 80014. Please use mysql_upgrade to fix this error. SQL Error: 3009

   I also tried to revoke the password for one of my users getting the same message.

How to repeat:
1.) Open MySQL Workbench 8.0014 as root.
2.) Select Users and Privileges.
3.) Click Add User
4.) Enter login name.
5.) Select 'Standard' (Authentication Type)
6.) Enter a strong password
7.) Enter it again in next box
8.) Click Apply 

Suggested fix:
Modify MySQL so that the column count expectation matches the actual count.
[28 Jan 2019 8:18] MySQL Verification Team
Thank you for the bug report. Looks your issue is not to run mysql_upgrade in the upgrade:
*************************** 50. row ***************************
  Field: Password_require_current
   Type: enum('N','Y')
   Null: YES
    Key:
Default: NULL
  Extra:
50 rows in set (0,00 sec)

mysql> show variables like "%version%";
+-------------------------+------------------------------+
| Variable_name           | Value                        |
+-------------------------+------------------------------+
| innodb_version          | 8.0.13                       |
| protocol_version        | 10                           |
| slave_type_conversions  |                              |
| tls_version             | TLSv1,TLSv1.1,TLSv1.2        |
| version                 | 8.0.13                       |
| version_comment         | MySQL Community Server - GPL |
| version_compile_machine | x86_64                       |
| version_compile_os      | Linux                        |
| version_compile_zlib    | 1.2.11                       |
+-------------------------+------------------------------+
9 rows in set (0,02 sec)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*************************** 51. row ***************************
  Field: User_attributes
   Type: json
   Null: YES
    Key:
Default: NULL
  Extra:
51 rows in set (0,00 sec)

mysql> show variables like "%version%";
+--------------------------+------------------------------+
| Variable_name            | Value                        |
+--------------------------+------------------------------+
| immediate_server_version | 999999                       |
| innodb_version           | 8.0.14                       |
| original_server_version  | 999999                       |
| protocol_version         | 10                           |
| slave_type_conversions   |                              |
| tls_version              | TLSv1,TLSv1.1,TLSv1.2        |
| version                  | 8.0.14                       |
| version_comment          | MySQL Community Server - GPL |
| version_compile_machine  | x86_64                       |
| version_compile_os       | Linux                        |
| version_compile_zlib     | 1.2.11                       |
+--------------------------+------------------------------+
11 rows in set (0,01 sec)
[28 Jan 2019 10:20] Daniel Lewis
How can I, or anyone else for that matter, revert back to version 8.0013 for MySQL, Workbook, and Connector J?
[29 Jan 2019 12:05] MySQL Verification Team
https://dev.mysql.com/doc/refman/8.0/en/downgrading.html

2.11.2 Downgrading MySQL

Downgrade from MySQL 8.0 to MySQL 5.7 (or from a MySQL 8.0 release to a previous MySQL 8.0 release) is not supported. The only supported alternative is to restore a backup taken before upgrading. It is therefore imperative that you backup your data before starting the upgrade process.
[29 Jan 2019 13:17] Daniel Lewis
Downgrading is not a possibility. Version 5.7 is not capable of reading an import from 8.00.14. Since the problem is with the upgrade, what is wrong with exporting the data using Workbook 8.00.14 (already done), purging MySQL, Workbook, and ConnectorJ version 8.00.14. Then downloading version 8.00.14 of these programs from your website and doing a clean install? Finally, importing the data I have just saved? I think this should solve the problem of the number of columns being different from what is expected.
[29 Jan 2019 14:21] MySQL Verification Team
Notice that the mysql.user table only has 50 columns of 8.0.13 because after an upgrade to 8.0.14 is needed to run mysql_upgrade -uroot -p so the table will be upgraded to have 51 columns. Not sure if you got that from what I printed here.
[29 Jan 2019 16:42] Daniel Lewis
I ran mysql_upgrade, AND read the section in the MySQL Manual about this. Upon opening Workbook as root, I can add or delete users again. When the tables were checked, The results came back OK. There is one note at the bottom that concerns me now. Is this a problem? If not, the problem has been completely resolved. Thanks!

Upgrade process completed successfully.
Could not create the upgrade info file '/var/lib/mysql/mysql_upgrade_info' in the MySQL Servers datadir, errno: 13