How to manually upgrade mysql database

Source: Internet
Author: User

I have a requirement in my recent work. I need to upgrade Mysql in ubuntu 14.04 from Mysql 5.5 to Mysql 5.7. You can choose apt-get for installation, but you need to update the system or modify the software source. After some hard work, the manual upgrade was successful!

Download the corresponding deb package based on the operating system version, the download address is the fuse mysql-server_5.7.13-1ubuntu14.04_amd64.deb-bundle.tar, this tar file contains all the related deb

Tar-xvf mysql-server_5.7.13-1ubuntu14.04_amd64.deb-bundle.tar

Use dpkg-I <xxx. deb> to install the deb package. The installation sequence is the most important here. The installation sequence is shown below.

# Dpkg-I mysql-common_5.7.13-1ubuntu14.04_amd64.deb
# Dpkg-I libmysqlclient20_5.7.13-1ubuntu14.04_amd64.deb
# Dpkg-I libmysqlclient-dev_5.7.13-1ubuntu14.04_amd64.deb
# Dpkg-I libmysqld-dev_5.7.13-1ubuntu14.04_amd64.deb
// Then you need to write in 5.5, using apt-get remove mysql-client-5.5
# Dpkg-I mysql-community-client_5.7.13-1ubuntu14.04_amd64.deb
# Dpkg-I mysql-client_5.7.13-1ubuntu14.04_amd64.deb
// Install libmecab2 dependency.
// The installation prompts you to set the mysql root password.
# Apt-get install libmecab2
# Dpkg-I mysql-community-server_5.7.13-1ubuntu14.04_amd64.deb
# Dpkg-I mysql-server_5.7.13-1ubuntu14.04_amd64.deb
After the upgrade, check the mysql version.

# Mysql-V // uppercase

Here, by the way, the reason for upgrading mysql is that the mysql database on the development machine needs to be transferred to my notebook for further development. On the development machine, mysql is version 5.7, and on the notebook, mysql is version 5.5. I used mysqldump to back up the original database (saved as dump. mysql-u <user>-p <password> <database> <dump. SQL, found to have failed! According to the error cause, the two versions have some differences in mysql statement processing. mysql 5.5 cannot recognize some SQL statements dumped by mysql 5.7.

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.