Solusi Unknown collation: ‘utf8mb4_unicode_ci’ dengan Upgrade MySQL CWP

mysql upgradeMemakai Centos Webpanel dan mendapat galat Unknown collation: ‘utf8mb4_unicode_ci’  ketika akan mengimpor database MySQL? Jika mengalami hal ini, tandanya MySQL masih menggunakan versi lawas.

Bagaimana cara mengupgradenya?

1. Backup dulu seluruh database dengan mysqldump 

# mysqldump --events --all-databases | gzip > /home/alldatabases.sql.gz

2. Masukkan Remi repo

# cd /etc/yum.repos.d
yum.repos.d]# wget http://rpms.famillecollet.com/enterprise/remi.repo
--2016-07-17 13:38:58--  http://rpms.famillecollet.com/enterprise/remi.repo
Resolving rpms.famillecollet.com... 195.154.241.117, 2001:bc8:33a1:100::1
Connecting to rpms.famillecollet.com|195.154.241.117|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1999 (2,0K) [text/plain]
Saving to: “remi.repo”
...

3. Enable-kan repo

[yum.repos.d]# yum --enablerepo=remi update mysql-server
Loaded plugins: fastestmirror
Setting up Update Process
Loading mirror speeds from cached hostfile
 * base: centos.mirror.serveriai.lt

4. Upgrade MySQL

yum.repos.d]# sudo mysql_upgrade

5. Restart MySQL

yum.repos.d]# service mysqld restart
Stopping mysqld:                                           [  OK  ]
Starting mysqld:                                           [  OK  ]

Selesai.

Semoga bermanfaat!

Leave a Reply

Your email address will not be published. Required fields are marked *