1. Download MySQL Latest compressed version.
The URL is as follows: https://dev.mysql.com/downloads/mysql/, pull to the bottom of the page, as needed, choose the combination you need, you can get the latest version of win below the 64-bit MySQL compression version.
2. Back up the current MySQL.
- Stop the Phpstudy service
- Exit Phpstudy
- Rename the MySQL folder under Phpstudy to Mysql.old, the default location is C:\phpStudy\PHPTutorial\MySQL
3. Unzip the latest version of MySQL
Download the MySQL compressed version, unzip to phpstudy below the MySQL directory, the default location is C:\phpStudy\PHPTutorial\MySQL.
4. Add MySQL path to environment variable
5. Configure My.ini
6. Add Skip-grant-tables to My.ini mysqld, omit password login
7. Start MySQL
- Start cmd with administrator, enter net start MySQL
- Mysql-uroot connecting to MySQL
8. Run the following command under MySQL
use mysql; # use mysql tableupdate user set authentication_string=PASSWORD("root") where User=‘root‘; # update password to rootupdate user set plugin="mysql_native_password" where User=‘root‘; # set password resolving to default mechanism for root userflush privileges;quit;
9. Comment out skip-grant-tables in My.ini, restart MySQL service
10. Reconnect MySQL, log in with Root/root
Upgrading MySQL in the Phpstudy