Phpstudy upgrading MySQL Database

Source: Internet
Author: User
Tags mysql version

First look at the MySQL version of Phpstudy:

Method one uses the version function of MySQL:

Version ();

Method Two Status command

mysql> status;

Method three directly under cmd Input command view

MySQL -vMySQL --help

Start upgrading the database below

1. Back up your own database.

2, empty the Phpstudy MySQL folder, remember to close the phpstudy, otherwise you cannot empty the folder.

3, download mysql5.6, Link: https://dev.mysql.com/downloads/mysql/5.6.html#downloads, select the required version, because I am 64-bit, so choose to download 64-bit

4, Download complete, unzip the entire folder before emptying,

5, then copy the My-default.ini, change to My.ini, modify the configuration path

Basedir = D:\phpStudy\mysql= D:\phpStudy\mysql\data

6. Add Environment variables (if you have previously omitted this step)

D:\phpStudy\MySQL\ Bin

7. Open cmd as an administrator in the bin directory and install MySQL

Mysqld Install

After the installation is complete, you can start with phpstudy or you can use the net start MySQL

8, set the password, just installed MySQL is no password

1) Log in directly using the command, the first login without password, directly enter the good (root for the user name).

   

2) Change the password, originally changed the password is password column, but 5.7 changed to authentication_string

Update user set Password=password (' root ') where user= ' root ';

3) Refresh the MySQL system permissions related table (new settings user or change password)

Flush Privileges

4) Restart MySQL (command line), Windows can not directly restart (restart), can only stop, then start.

net stop MySQL
net start MySQL

9. Change remote access (default to native access only)

 Use MySQL;    // Select the database select User,host from user;    // View users and hostupdate user set host= "%" where host= "127.0.0.1";

10, mandatory upgrade check (can skip)

Because the upgrade sometimes causes some unsynchronized problems, it is best to exit MySQL and perform a mandatory upgrade check to ensure that the database is upgraded correctly and is forced to correct.

Mysql_upgrade-uroot-p--force

11, the database upgrade has been completed, view the version can be.

Phpstudy upgrading MySQL Database

Related Article

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.