Linux Database Upgrade

Source: Internet
Author: User
Tags documentation mysql version

Turn from: Old Left blog: http://www.laozuo.org/6145.html

Old left today in Help friend's blog moved to another VPS host environment, its environment is LLSMP architecture, the original server used is LNMP site environment, its blog is WordPress. Inform when importing the database "Unknown collation: ' utf8mb4_unicode_ci '" error prompt, this problem should be WordPress4.2 version of the later, there is no such problem before remember.

See the official WordPress Community documentation, there is a reference to the MySQL version caused by the problem, Because the default LLSMP environment MySQL is version 5.1, and the LNMP environment is installed in the MySQL version 5.5, so the high version is incompatible with the low version, the official recommendation is to upgrade MySQL version 5.5, so I also use this method.

First, back up the database and Web site files

Before we toss it, we still need to back up the database and the Web page file locally to avoid problems affecting the current environment and the operation of other sites.

Second, stop MySQL running and uninstall the old version

Service mysqld Stop #暂停MYSQL

Yum Remove MySQL mysql-* #卸载老版本MYSQL

With the above command, we stop the current MySQL operation before uninstalling the old MYSQL5.1 version database.

Third, check and unload residual mysql-libs

Yum List Installed | grep MySQL

We check if there are any remnants of mysql-libs, and if there is, we execute the following command to clear out.

Yum Remove Mysql-libs

It does not matter if you do not perform the cleanup.

IV. Upgrade and Installation MYSQL5.5

Here old left reference online a quick way to solve, because will go out to work, in this article is not selected version installed, directly using the source package 5.5 default installation.

RPM-UVH http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
RPM-UVH http://mirrors.neusoft.edu.cn/epel/6/i386/epel-release-6-8.noarch.rpm
RPM-UVH http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
RPM-UVH http://dl.iuscommunity.org/pub/ius/stable/Redhat/6/x86_64/epel-release-6-5.noarch.rpm
RPM-UVH http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

Install some dependent environments first.

Yum--enablerepo=remi,remi-test info MySQL mysql-server

Then perform the installation MYSQL5.5

Yum--enablerepo=remi,remi-test install MySQL Mysql-server

Execution is complete. So far we can check the MySQL version by Mysql-v is 5.5, but not yet, according to the prompt need to configure the file, but do not understand why the old left and did not modify the MySQL configuration file can also be executed, is it Providence?

V. Start-Up and inspection

Mysql_upgrade-u root-p

Originally based on the network method is necessary to modify the configuration file, I did not modify or can be completed, so continue to perform the upgrade boot execution, enter the original MySQL root password, let go over again.

After that we execute the start MySQL

Service mysqld Restart

If you can see two green OK, then everything is fine.

Sum up, so that we can import the database again without the coding problem. See the documentation mentioned can be directly in the export MySQL database when the version of the selection, the old left to try, because the upgrade of MySQL there is a lot of uneasiness and trouble, in case of errors in the trouble.

Linux Database Upgrade

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.