Upgrade Phpstudy MySQL version to 5.7.17 because the local integration environment is Phpstudy 2016, the option to upgrade the MySQL version is not found, so upgrade yourself. Download the high version of mysql:https://dev.mysql.com/downloads/file/?id=467269 from the official website, the selected version is 5.7.17 (later found that the 5.7 version of the installation, system table fields, etc. and the previous version is different). Step: 1. Back up the original MySQL installation directory in Phpstudy 2. Unzip the downloaded MySQL archive to the MySQL directory under Phpstudy, copy the My-default.ini, and rename it to My.ini. Open My.ini, find #basedir edit: Basedir = D:\phpStudy7\MySQL
DataDir = D:\phpStudy7\MySQL\data Note: There are any errors caused by the above path configuration error 3. Add the MySQL installation path to the system environment variable procedure: computer--System Properties, advanced system Configuration, environment variable Select path, after which you add: the path to your MySQL Bin folder (for example: my: D:\phpStudy7\MySQL\bin) The modified path is: path= ...;D: \phpstudy7\mysql\bin ( Note: 1. The semicolon must be entered in English after the original path, and 2. is appended, not overwritten. 4. Enter the MySQL bin directory under cmd (my is D:\phpStudy7\MySQL\bin), execute: Initialize database: Mysqld--initialize 5. Installation Services: Mysqld-install start service: NET STA RT MySQL6. Log in MySQL now error: c:\users\dell>mysql-uroot-p Enter Password: * * * * ERROR 1045 (28000): Access denied for user ' Root ' @ ' localhost ' (using password:yes) attempts to modify the root user password: Open my.ini, Find [mysqld], add: skip-grant-tables (this parameter is used to forget the MySQL password) At this point, use the root account, enter the password at the login. Change Password: mysql>update mysql.user set Authentication_string=password (' New password ') where user= ' root ' and Host = ' localhost ';
mysql> ALTER User User () identified by ' New password '; Refresh permissions: Flush privileges; Comment out the skip-grant-tables you just added in My.ini to log back in. View MySQL version:mysql> select version () at this time;
+-----------+
| Version () |
+-----------+
| 5.7.17 |
+-----------+
Upgrade Phpstudy in MySQL version to 5.7.17