Upgrade from WinEIM Server
The full steps for upgrading from WinEIM Server 9 to HelpChat Server 11, including database export and import, table migration and copying profile photos.
Read before upgrading
Info
- WinEIM Server 9.5 users must first upgrade to the 9.9 series (the 9.9 package includes upgrade instructions), then follow the steps below.
- Departments, accounts, account name remarks, groups and visibility permissions between departments and accounts can all be imported into HelpChat Server.
- HelpChat Server is not compatible with the WinEIM message format, so existing messages and file transfer records cannot be imported.
1. Export the WinEIM database
Open a command prompt and go to the WinEIM MySQL bin directory:
cd C:\WinEIM Server\imserver\mysql\bin Export the wineimsvr database to an SQL file:
mysqldump -u root --port=6306 -p wineimsvr > wineimsvr.sql Enter the password to start the export. When it finishes, a wineimsvr.sql file is created in the current directory. Copy this file to the HelpChat Server MySQL bin directory:
C:\HelpChat Server\imserver\mysql\bin 2. Import the data into HelpChat Server
Open a command prompt, go to the HelpChat Server MySQL bin directory and sign in:
cd C:\HelpChat Server\imserver\mysql\bin
mysql -u root --port=6306 -p Enter the default password 123456, then run these three commands in order to create the database and import the data:
create database wineimsvr CHARSET=utf8 COLLATE=utf8_unicode_ci;
use wineimsvr;
source wineimsvr.sql; 3. Convert the character encoding
Run the following commands one line at a time to convert the encoding to utf8mb4:
ALTER DATABASE wineimsvr CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
ALTER TABLE imuser CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE imuser CHANGE account account VARCHAR(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE imuser CHANGE name name VARCHAR(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE imuser CHANGE `show` `show` VARCHAR(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; 4. Migrate the tables
Run the following SQL commands one at a time to import the WinEIM data into the HelpChat tables. Each command is one complete line; after you press Enter, the number of imported rows is shown.
Department table:
insert into `helpchatsvr`.`help_dept`( `did`, `pdid`, `name`, `order`, `regswitch`, `permission` ) select `did`, `pdid`, `name`, `displayorder`, `regswitch`, `permissioninfo` from `wineimsvr`.`imdept`; Department-account relation table:
insert into `helpchatsvr`.`help_deptuser`( `iid`, `uid`, `did`, `order` ) select `rid`, `uid`, `did`, `sortid` from `wineimsvr`.`imdeptuser`; Account table:
insert into `helpchatsvr`.`help_user`( `uid`, `account`, `password`, `salt`, `name`, `shows`, `sex`, `permission`, `createtime`, `lastlogin` ) select `uid`, `account`, `password`, `salt`, `name`, `show`, `sex`, `permission`, `createtime`, `lastlotime` from `wineimsvr`.`imuser`; Remark table:
insert into `helpchatsvr`.`help_remark`( `rid`, `ouid`, `uid`, `remark`, `dtime` ) select `rid`, `ouid`, `uid`, `remark`, `dtime` from `wineimsvr`.`imremark`; Group table:
insert into `helpchatsvr`.`help_club`( `cid`, `name`, `shows`, `rootuid`, `maxuser`, `createtime`, `deleted` ) select `cid`, `name`, `publics`, `rootuid`, `maxuser`, `createtime`, `deleted` from `wineimsvr`.`imclub`; Group member table:
insert into `helpchatsvr`.`help_clubuser`( `rid`, `cid`, `uid`, `type` ) select `rid`, `cid`, `uid`, `type` from `wineimsvr`.`imclubuser`; 5. Turn on automatic table rebuilding
Open config\mysql.ini in the HelpChat Server root directory and add checktable = 1 at the end:
[mysql]
host = 127.0.0.1
port = 6306
user = root
pswd = 123456
db = helpchatsvr
dbex = helpchatsvrex
charset = utf8mb4
checktable = 1 6. Migrate profile photos
Copy the WinEIM profile photo files from:
C:\HelpChat Server\imdata\res\photo to this HelpChat Server directory:
C:\HelpChat Server\imdata\user 7. Finish the upgrade
After all the steps above are done, restart the HelpChat Server background services. You can then sign in to the HelpChat desktop or mobile client with your existing WinEIM account.
Warning
Tip