Detailed process for upgrading DiscuzX2 to DiscuzX3

Source: Internet
Author: User
The forum needs to be upgraded from x2 to x3. what I need to do is that the discuz installed online in the database is GBK, and the database is about 30 GB, which needs to be converted to UTF-8 encoding first, upgrade 1. export data to the online database. During export, specify the encoding as UTF8. some tables have a large data size. you can export several large tables separately before exporting the remaining data.

The forum needs to start from x2UpgradeTo x3, what I need to do is mainly about the database.

Online installationDiscuzIt is GBK, and the database is about 30 GB. it needs to be converted to UTF-8 encoding beforeUpgrade

1. import data

Export online databases,Specify the encoding as UTF8 during export.

Some tables have large data. you can export several large tables separately before exporting the remaining tables.

MysqlDump-uroot-p123 -- default-character-set = utf8 x2 table1> table1. SQL

Mysqldump-uroot-p123 -- default-character-set = utf8 -- ignore-table = x2.table1 x2> other. SQL

2. transcoding

Convert gbk to utf8

Sed-I "s # gbk # utf8 # g" table1. SQL

Some tables are encoded as latin1. in addition to utf8, character set gbk needs to be removed.

If these tables are not converted, garbled characters will also occur.

3. import data

Pre_common_member, pre_uc_members. before importing the two tables, remove the unique key.

Process the same user name through a program.

After processing, add the unique key back.

Import the encoded data to the new database and specify the encoding as utf8 during import.

The data here is basically successfully transferred in. you can startUpgradeNow

You can also try to import the table structure first, then change the corresponding encoding to UTF8, and then import the data.

4. problems encountered

When importing the pre_forum_post table, the data is too big (the data is about 10 GB, and the index is 3 GB +)

An error is reported during import and needs to be modified.

Sort_buffer_size = 8192 M

Read_buffer_size = 8192 M

Database imported successfully, discuzUpgradeAfter the operation is successful, an error occurs.

The page style of the entire forum is incorrect. the cache cannot be cleared and the image cannot be displayed.

When The Post is opened, the system prompts "the Post does not exist"

This is mainly becauseUpgrade, The reason why memcache is not cleared

Kao, for this reason, the first nightUpgrade, Wasted

UpgradeIn the process, I still encountered a lot of problems, many of which were not recorded at the time and are easy to forget.

So, probably record it

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.