Super Contributor.. eelgheez Super Contributor..
Super Contributor..
9548 views

mysql upgrade to 8.0.11

Jump to solution

Upgrading MySQL from 8.0.0-dmr to 8.0.11 failed to load the data directory, so I ran mysqldump --routines to save the fortify database, initialized the data directory (mysqld --console --datadir DIR --initialize), configured the root password, created the database, created the user, granted full rights on the database to the user and executed the saved database SQL dump.  It took only 10 minutes to process an almost 4GB SQL file.

I upgraded Tomcat to 9.0.8 as well.

All is well, the SSC application is running, except the dashboard showing 0s and 1s in the "Application Version" column.  The "Applications" link shows both application names and their versions correctly.

 

Any hint if I missed anything in my upgrade?  Is there a way to rectify the database? (I have a backup).  Thanks.

0 Likes
1 Solution

Accepted Solutions
Highlighted
mlacasse Super Contributor.
Super Contributor.

Re: mysql upgrade to 8.0.11

Jump to solution

eelgheez,

Good catch, I have normally only seen those failures when using incorrect JDBC drivers.   Since Mysql 8.0 has not been tested with the latest version of SSC, there is bound to be a few gotchas where the behavior has changed since 5x.

-mark

4 Replies
mlacasse Super Contributor.
Super Contributor.

Re: mysql upgrade to 8.0.11

Jump to solution

Hi eelgheez,

 The first thing I would do is get yourself on Tomcat 8.5 instead.  You should probably just remove 9x, install 8.5 and redeploy the war. (no need to do migration or seeding, that is already done)  I can't vouche for any SSC behavior with 9.0 as it has not been tested with any of our released versions.   Might be as simple as that with the dashboard issue.  

 Also, if you can see all your applications, issues and audits. Then it sounds like you got your database upgraded and attached just fine. 

-mark

Fortify Support

0 Likes
Super Contributor.. eelgheez Super Contributor..
Super Contributor..

Re: mysql upgrade to 8.0.11

Jump to solution

I narrowed the issue down to MySQL's PIPES_AS_CONCAT server mode.  Using the following line in my.ini appears to work, but I did not read much to make sure I preserved the MySQL 5 behaviours correctly.  (The TRADITIONAL mode that I decided to use does not mean MySQL "traditional", but rather applies to a general SQL server behaviour of rolling back all rows on seeing an error even in one row.  I used it to prioritize data consistency over application stability).

[mysqld]

# [...]

# PIPES_AS_CONCAT https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sqlmode_pipes_as_concat enables string concatenation with ||, as used by Fortify SSC.

sql_mode=TRADITIONAL,PIPES_AS_CONCAT

The dashboard's list of application versions uses a REST API "issueaging" (The Applications link uses "projectVersions" which worked fine).  I traced the SQL query in the former using MySQL's "log" option, then narrowed down the issue to the use of pipes "||" for string concatenation.

 

0 Likes
Super Contributor.. eelgheez Super Contributor..
Super Contributor..

Re: mysql upgrade to 8.0.11

Jump to solution

I narrowed the issue down to MySQL's PIPES_AS_CONCAT server mode.  Using the following line in my.ini appears to work, but I did not read much to make sure I preserved the MySQL 5 behaviours correctly.  (The TRADITIONAL mode that I decided to use does not mean MySQL "traditional", but rather applies to a general SQL server behaviour of rolling back all rows on seeing an error even in one row.  I used it to prioritize data consistency over application stability).

[mysqld]

# [...]

# PIPES_AS_CONCAT enables string concatenation with ||, as used by Fortify SSC,
# https://dev.mysql.com/doc/refman/8.0/en/sql-mode.html#sqlmode_pipes_as_concat
sql_mode=ONLY_FULL_GROUP_BY,TRADITIONAL,PIPES_AS_CONCAT

The dashboard's list of application versions uses a REST API "issueaging" (The Applications link uses "projectVersions" which worked fine).  I traced the SQL query in the former using MySQL's "log" option, then narrowed down the issue to the use of pipes "||" for string concatenation.

 

0 Likes
Highlighted
mlacasse Super Contributor.
Super Contributor.

Re: mysql upgrade to 8.0.11

Jump to solution

eelgheez,

Good catch, I have normally only seen those failures when using incorrect JDBC drivers.   Since Mysql 8.0 has not been tested with the latest version of SSC, there is bound to be a few gotchas where the behavior has changed since 5x.

-mark

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.