"Warning: Using a password on the command line interface can be insecure.?ERROR 1273 (HY000) at line 7819: Unknown collation: 'utf8mb4_0900_ai_ci'?dumper err?"("-17")
As you may know, I’m using MySQL exclusively on GNU/Linux. To be honest for me it’s almos 20 years that the year of Linux on the desktop happened. And I’m very happy with that.
So I spent some time to install a Windows VM and for the very first time, MySQL on Windows !
The goal was to describe how to upgrade from MySQL 5.7 to MySQL 8.0.
So once MySQL 5.7 was installed (using MySQL Installer), I created some data using MySQL Shell:
Of course I used latest MySQL Shell, 8.0.18 in this case. Don’t forget that if you are using MySQL Shell or MySQL Router, you must always use the latest 8.0 version even with MySQL 5.7.
Before upgrading, I ran MySQL Upgrade Checker to be sure everything is compatible with MySQL 8.0:
No problem, I’m good to go !
Don’t forget, now it’s the right time to perform a backup or a snapshot.
The first step is to stop the MySQL Service:
When done, you have to launch once again the MySQL Installer and use Modify your MySQL 5.7 Server product features to only leave the Sever data files checked:
When all is proceeded, you return to the MySQL Installer Product Overview and you Add a new product:
We select the latest MySQL 8.0 and there is no need to select Server data files, as we will upgrade our current data:
When is done, please stop the new MySQL80 service and modify the my.ini (of MySQL 8.0!) that is located in System\ProgramData\MySQL\MySQL Server 8.0 by default:
In that file, we modify the actual value of datadir and we point it to where was located the datadir of MySQL 5.7. In this example I only used the default values:
And now it’s the most tricky part of the upgrade process, when you save this file, you must specified the ANSI encoding:
If you don’t use the right encoding, when you will start the MySQL Service, in the error log you will have a message like this: [ERROR] Found option without preceding group in config file ... at line 1
When saved, you can start the service. It will take some times as MySQL will proceed to the upgrade of the system tables and other files as you can see in the error log:
When the service is running again, you can connect and you should have access to all the data that was in you previous MySQL 5.7:
As you can see the test schema is there and of course we can check the content too:
I hope this post answers the questions of those that were experiencing issues when trying to perform an in-place upgrade from MySQL 5.7 to MySQL 8.0 in Microsoft Windows.
Since 1996, our company has been focusing on domain name registration, web hosting, server hosting, website construction, e-commerce and other Internet services, and constantly practicing the concept of "providing enterprise-level solutions and providing personalized service support". As a Dell Authorized Solution Provider, we also provide hardware product solutions associated with the company's services.
Contact Us
Address: No. 2, Jingwu Road, Zhengzhou City, Henan Province
Phone: 0086-371-63520088
QQ:76257322
Website: 800188.com
E-mail: This email address is being protected from spambots. You need JavaScript enabled to view it.