Upgrade MySQL issues under Windows

Source: Internet
Author: User
Tags mysql version

For historical reasons, today to see the outage for a period of time the cloud server still has six months of effective time, the above running MySQL connected to a variety of error, but in general still does not affect the use of testing. But when doing the experiment found that the database could not support UTF8MB4, so you have to upgrade it.


Old Library version 6.0, but the latest version of the MySQL official website is only 5.7, at first thought that the previous maintainer downloaded the source version after the compilation, in the Open my own for the record database related information of Notepad, inadvertently see the previously configured MySQL version NDB, The original NDB is 6.x, and the normal MySQL 5.x has a corresponding relationship.


1, data export, although its data may no longer be useful, but for operational security habits, or to do a backup. Exported data files up to 1.2G.

> Mysqldump-h127.0.0.1-uroot-p--all-databases > Data.sql

2. Stop service, MySQL is registered as a Windows service at the time of installation, click Stop Service directly

3. Uninstall the old version of MySQL and remove it from the Add and remove Programs.

4. Download the latest installation program on the website and install it.

5. Import the original data

> Mysql-h127.0.0.1-uroot-p < Data.sql

# The problem comes, import times wrong "Unknown command \ n '", this data just baked less than half an hour, although the version of the old point but the difference is not small, using utraledit open to see what is abnormal, reasoning, should be a character set problem. Check out the original form, use UTF8, add a parameter to try, done!

> Mysql-h127.0.0.1-uroot-p--default-character-set=utf8 < Data.sql

6. Create a new user

* Use the GUI client connection from the MySQL website to prompt when creating a new user

Unhandled Exception:DbMySQLQuery.resultFieldStringValueByName ():

Mysql_resultset::isnull:invalid value of ' ColumnLabel '

* Use GUI not, then I change command line try, create process can, heart is small fortunately, flush privileges error

Flush privileges in My SQL gives HY0000 Unknown Error

* Really pit in the pit, the problem one by one, check a lot of the MySQL official forum to explain this issue, basically it is recommended to revert to the original NDB version until the issue is resolved. Please, I just to upgrade to change over, let me go back, this is not a blind toss.

Try to upgrade, MySQL with the Mysql_upgrade command, the official website to explain the command, check and upgrade the table.

> mysql_upgrade-h127.0.0.1-uroot-p

There are a lot of OK, in the middle there is a very obvious repair operation, display "re-installing the SYS schema", then try the GUI, complete, all kinds of operations are normal.


Conclusion: For open source software database, if you do not have the energy to cope with, try to choose the regular release version, on the line and then replace the odds are very little, can not move. Other fresh branches are reserved for people who have time and interests to study.

This article is from the "Spark" blog, please be sure to keep this source http://231181.blog.51cto.com/221181/1897643

Upgrade MySQL issues under Windows

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.