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.