| Bug #98056 | MySQLShell upgradeCheck won't work with logins using ip/subnet | ||
|---|---|---|---|
| Submitted: | 23 Dec 2019 11:56 | Modified: | 28 Feb 2020 11:44 |
| Reporter: | IGG t | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | Shell Upgrade Checker | Severity: | S3 (Non-critical) |
| Version: | 8.0.18 | OS: | Any |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | MySQL, mysqlshell | ||
[24 Dec 2019 6:17]
MySQL Verification Team
Hello! Thank you for the report. Thanks, Umesh
[28 Feb 2020 9:06]
Konrad Olesinski
Posted by developer: Fixed together with fix to Bug#30536355
[28 Feb 2020 11:44]
Margaret Fisher
Posted by developer: Added to changelog entry for BugĀ #30536355 and edited to read: Some host names were not parsed correctly in the connection data provided when running MySQL Shell's upgrade checker utility checkForServerUpgrade(), including where the user account's host name had been set up by specifying an IP address and subnet mask.

Description: MySQL Shell Upgrade Checker Utility doesn't work with with logins that are set up with host = ip/subnet. e.g. user@'10.0.0.0/255.0.0.0' How to repeat: I have two logins which are set up as follows: CREATE USER 'test1'@'10.0.0.0/255.0.0.0' IDENTIFIED BY 'password; GRANT ALL ON *.* TO 'test1'@'10.0.0.0/255.0.0.0'; CREATE USER 'test2'@'%' IDENTIFIED BY 'password; GRANT ALL ON *.* TO 'test2'@'%'; I then use MySQLShell to run the upgradeChecker against that database: mysqlshell > util.checkForServerUpgrade("test1@10.1.2.3:3306", {"password":"password", "targetVersion":"8.0.18", "configPath":"c:\mysql\my.ini"}) This results in an error: Util.checkForServerUpgrade: Invalid syntax in account name 'test@10.0.0.0/255.0.0.0' (RuntimeError) However, If I use test2, it works as expected: mysqlshell > util.checkForServerUpgrade("test2@10.1.2.3:3306", {"password":"password", "targetVersion":"8.0.18", "configPath":"c:\mysql\my.ini"}) This is being run against a copy of MySQL running version 5.7.28. Suggested fix: It needs to work with logins that use ip/subnet for their host to restrict access.