Updated: April 4, 2024 2:47pm

Upgrade from MySQL 5.7 to 8.0

PDF

This topic explains how to upgrade from MySQL 5.7 to 8.0 using the Windows ZIP Distribution method. This method enables retailers to easily upgrade MySQL without the need to export and later reimport the database. After performing the cross-version upgrade from 5.7 to 8.0 using the Windows ZIP distribution method, you can upgrade to a more recent version of 8.0 by running the installer for that version (e.g., 8.0.35). Important! The most current version of MySQL (8.2) is not compatible with Prism. More information can be found at https://dev.mysql.com/doc/refman/8.0/en/windows-upgrading.html 

Considerations and Limitations
The process described here does not rename the root folder containing the files or remove registry keys. For example, after a successful upgrade, users will  see a "C:\Program Files\MySQL\MySQL Server 5.7" folder in Windows Explorer and references to 5.7 in MySQL Workbench.
Before you Begin

Sample MySQL Archived Versions download page:
MySQL archived version download

Step 1. Stop MySQL and Prism services
Stop the MySQL service and all Retail Pro Prism services.
MySQL service stop

Sample Retail Pro Prism Services being stopped:
Prism service stop

Step 2. Extract Windows ZIP Archive Files
Extract all the files from the downloaded Windows ZIP archive. Copy all the files to the existing MySQL installation folder (C:\Program Files\MySQL\MySQL Server 5.7\) and replace (overwrite) the existing files. Because the files you are adding have the same name as existing files, a prompt asks whether to replace or skip those files. Select "Replace the files in the destination."
replace files message
If prompted to provide administrator permission, select the "Do this for all current items" checkbox and click Continue.
Grant folder access 
Step 3. Edit my.ini File
Certain options in the existing my.ini file are not compatible with the MySQL version 8.0 you just installed. Modify the my.ini file located at C:\ProgramData\MySQL\MySQL Server 5.7\
Comment out character-set-server, query_cache_type, query_cache_size entries (put a # in front of each setting; not all settings may be present).
#character-set-server=utf8
#query_cache_type=1
#query_cache_size=1M

Next, remove the NO_AUTO_CREATE_USER option in the sql-mode entry.
Before:
sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
After:
sql-mode="STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION"

Finally, the "innodb_buffer_pool_size" param in mysql.ini SHOULD NOT be empty. The comments within the mysql.ini file provide detailed information about the InnoDB buffer.
Save and close my.ini file.

Step 4. Install Visual C++ Redistributable
Install Microsoft Visual C++ 2015-2019 Redistributable x64. If you didn't download it already, it can be downloaded here: https://aka.ms/vs/16/release/vc_redist.x64.exe

Step 5. Restart Prism Services.

restart prism services

Step 5. Restart MySQL Service
Restart the MySQL service. This process may take some minutes and may even fail with an error stating that the MySQL service failed to start in a timely manner. If the process fails, click OK to close the error. The service needs more time to start.
MySQL Server fail to start
Wait a minute and then start MySQL Workbench.
Click the desired connection (e.g., localhost).
Enter MySQL login credentials and click OK.
MySQL workbench login
You should see the rpsods database schema on the left, an indication of a successful connection.
rpsods schema on left

Click Server Logs and scroll to near the end of the log. You should see a confirmation that the upgrade from 5.7 to 8.0 is complete.
MySQL Server log showing upgrade to 8.0 complete
Click Server Status to verify the version and other information.
MySQL Server status

Step 6. Verify MySQL Server operates smoothly
BEFORE upgrading Prism or running the Prism Server installer:
Make sure the MySQL Server runs smoothly without any errors. Stopping & starting MySQL server 8.0 should take the normal time (less than 30 secs). If the service doesn't start in 30 seconds then the Prism installer may fail to establish connection with MySQL server during DB update process.

Step 7. Restart Prism Services.

restart prism services

Silent Install of Prism 2.1 Server (MySQL) via Command Line
(The Silent Install feature is available for Prism 2.0 and above. It is not available for Prism 1.14.7 and earlier.)

You can install Prism in "silent" mode by creating a scheduled task that runs the install scripts from the command line. Each Prism component has its own installer; therefore, you will have to create a scheduled task for each component that you want to install. The installers are found in the "Prism_[version}\[component]" folder of the Prism setup files. The following table lists the installers.

Installer Files

Installer File Folder and Description
ApacheInstaller.exe Prism_[version}\Apache has the Apache web server installer.
Win32PrismServerInstaller.exe Prism_[version}\Server has the Prism Server installer.
Win32PrismProxyInstaller Prism_[version}\PrismProxy has the Prism Proxy installer.
Win32PrismDocumentDesignerInstaller.exe Prism_[version}\DocumentDesigner has the Document Designer installer.

Example Script
MySQL
C:\Win32PrismServerInstaller.exe  /SkipVCInstall=Yes/UseMySQL=Yes/MySQLRootUsername=root /MySQLRootPassword=root /MySQLServerFolder="C:\mysql-5.7.29-win32\" /MySQLServerIni="C:\ProgramData\MySQL\MySQL Server 8.0\" /VERYSILENT /SUPPRESSMSGBOXES /LOG="c:\Win32PrismServerInstaller.log" /ClientID=12345 /RegKey="[SA Key]"

General Installer Parameters

General Installer Parameters Description
/VERYSILENT Runs the installer without displaying a UI, except when a user choice is required or confirmation message boxes. If this parameter is used errors will only be added to the log file and will not be shown.
/SUPPRESSMSGBOXES No message boxes will be displayed and YES will be selected for any confirmation boxes. For a completely silent install use both /VERYSILENT and /SUPPRESSMSGBOXES
/LOG={Path to Log file}  Triggers the installer to create the log file in the specified location.
/DELETEPRISMCERTIFICATE=YES This parameter should be included if running the Prism Server Installer or Prism Proxy Installer on an installation that has the deprecated Retail Pro self-signed SSL certificates installed. Those certificates should be removed and replaced with your own SSL certificates (added via SSL Manager in Tech Toolkit).
/ClientID="{Client ID}" This parameter should be included if running the Prism Server Installer. This is the ClientID used to identify this installation for Prism Licensing.
/RegKey="{SA KEY}" This parameter should be included if running the Prism Server Installer. This is the Product Key tied to the above ClientID. Used for Prism Licensing

Additional MySQL Parameters

Additional MySQL Parameters Description
/MySQLRootUsername="RootUserName" User with root access to the database. This is normally the root user. If the username includes spaces, it must be enclosed in quotation marks. If the username does not include spaces it can be enclosed in quotation marks but doesn't have to be.
Default=root
/MySQLRootPassword="RootUserPassword" Password for the above user. If the password includes quotation marks, it must be enclosed in quotation marks. If the password does not include spaces, it can be enclosed in quotation marks but doesn't have to be.
/MySQLServerFolder={Path to 32-bit MySQL folder} Path to the 32-bit MySQL binary files. This is not part of the MySQL server installation and must be installed separately. This is required for the installer and the operation of Prism.
/MySQLServernIni={Path to .ini file.} Path to MySQL.ini file. This is required so that the installer can ensure that the MySQL configuration is correct for Prism. This is not used for operation of Prism.
Default = C:\ProgramData\MySQL\MySQL Server X\