How to upgrade MySQL server on Windows? In my case, I am upgrading MySQL 5.5 to 5.7
1) Go to here : https://dev.mysql.com/downloads/mysql/ and Download it from here : https://prnt.sc/fo9zax
2) Extract it at any temp location on your PC (for ex, D:\mysql)
3) Copy "data" folder from your old installation, which should be here, "C:\Program Files\MySQL\MySQL Server 5.5\data"
4) Paste "data" folder inside extracted folder in step 2. (i.e. "D:\mysql\mysql-5.7.18-winx64")
5) Stop existing MySQL service.
6) Create new folder based on your new version inside "C:\Program Files\MySQL\". (i.e. MySQL Server 5.7)
7) Copy all files/folders from "D:\mysql\mysql-5.7.18-winx64" to "C:\Program Files\MySQL\MySQL Server 5.7"
8) Install the server as service using below command
--> "C:\Program Files\MySQL\MySQL Server 5.7\bin\mysqld" --install MySQL57
9) Change your environment variable PATH as per the latest folder.
10) Start the service with latest version using below command or using the Windows Task Manager
--> NET START MySQL57
11) Change the root user password with following commands
--> mysql -u root
--> use mysql;
--> update user set password=PASSWORD("mynewpassword") where User='root';
--> flush privileges;
--> exit;
12) Upgrade the mysql using below command
--> mysql_upgrade -u root -p
Enter your password which you set in setp no 10.
This should give you output like this, https://prnt.sc/fo9prk
13) You are done!
References
No comments :
Post a Comment