A lot of pits upgrade phpstudy in MySQL version to 5.7.17

Source: Internet
Author: User

Since the local integration environment is Phpstudy 2016, there is no option to upgrade the MySQL version, 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 the My.ini and locate the editor at #basedir:
Basedir = D:\phpStudy7\MySQLdatadir = 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 variables procedure: Advanced system Configuration, System properties, computer, systems, and environment variables select Path, after which you add: the path to your MySQL Bin folder ( such as: My is: D:\phpStudy7\MySQL\bin) modified PATH is: path= ...;D: \phpstudy7\mysql\bin (Note: 1. Must be appended to the original PATH after the English input semicolon; 2. is append, not overwrite. 4. Under CMD, go to the MySQL Bin directory (my is D:\phpStudy7\MySQL\bin), execute: Initialize the database:
Mysqld--initialize

5. Installation Services:
Mysqld-Install

Start the service:
net start MySQL
6. Log in MySQL error: c:\users\dell>mysql-uroot-p Enter Password: * * * * ERROR 1045 (28000): Access denied for user ' root ' @ ' L Ocalhost ' (using Password:yes) attempts to modify the root user password: Open my.ini, Find [mysqld], add below:
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' new password ';           

Refresh permissions:
FLUSH privileges;

Comment out the my.ini that you just added
Skip-grant-tables
Log in again. View the MySQL version at this time:
Select5.7.  |+-----------+ 

A lot of pits upgrade phpstudy in MySQL version to 5.7.17

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.