xtrabackup SST failing with character set utf8mb4

734 views
Skip to first unread message

do...@pagerduty.com

unread,
May 23, 2013, 6:16:47 PM5/23/13
to percona-d...@googlegroups.com
Hi,

I'm setting up a new XtraDB cluster and I'm running into an issue with xtrabackup based SST. I'm receiving an error that the utf8mb4 character set that we need is not valid. I'm able to log into the MySQL console and set this character set using "SET NAMES utf8mb4" so I know it's valid. Also, I have other XtraDB clusters setup using xtrabackup that work just fine. They're on older versions of xtrabackup, so I'm suspecting that the latest xtrabackup package has an issue with the utf8mbm4 character set. Downgrading to xtrabackup 2.0.7 on the new servers fixes the issue.

Our servers are running on Ubuntu 10.04. The following packages are installed on the server that is failing:

ii  percona-xtrabackup                2.1.3-608.lucid                                 Open source backup tool for InnoDB and XtraDB
ii  percona-xtradb-cluster-client-5.5 5.5.30-23.7.4-405.lucid                         Percona Server database client binaries
ii  percona-xtradb-cluster-common-5.5 5.5.30-23.7.4-405.lucid                         Percona Server database common files (e.g. /etc/mysql/my.cnf)
ii  percona-xtradb-cluster-galera-2.x 150.lucid                                       Galera components of Percona XtraDB Cluster
ii  percona-xtradb-cluster-server-5.5 5.5.30-23.7.4-405.lucid                         Percona Server database server binaries

On our other servers which are working fine, these packages are installed:

ii  percona-xtrabackup                2.0.4-487.lucid                                 Open source backup tool for InnoDB and XtraDB
ii  percona-xtradb-cluster-client-5.5 5.5.30-23.7.4-405.lucid                         Percona Server database client binaries
ii  percona-xtradb-cluster-common-5.5 5.5.30-23.7.4-405.lucid                         Percona Server database common files (e.g. /etc/mysql/my.cnf)
ii  percona-xtradb-cluster-galera-2.x 115.lucid                                       Galera components of Percona XtraDB Cluster
ii  percona-xtradb-cluster-server-5.5 5.5.30-23.7.4-405.lucid                         Percona Server database server binaries

Here's the error log I'm seeing on the failing server:

InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy
and Percona Ireland Ltd 2009-2012.  All Rights Reserved.

This software is published under
the GNU GENERAL PUBLIC LICENSE Version 2, June 1991.

130523 21:56:14  innobackupex: Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_file=/etc/my.cnf;mysql_read_default_group=xtrabackup;mysql_socket=/var/run/mysqld/mysqld.sock' as 'xrepl'  (using password: YES).
^GCharacter set 'utf8mb4' is not a compiled character set and is not specified in the '/usr/share/mysql/charsets/Index.xml' file
ERROR: Failed to connect to MySQL server: DBI connect(';mysql_read_default_file=/etc/my.cnf;mysql_read_default_group=xtrabackup;mysql_socket=/var/run/mysqld/mysqld.sock','xrepl',...) failed: Can't initialize character set utf8mb4 (path: /usr/share/mysql/charsets/) at /usr/bin/innobackupex line 1384

Is this a known bug?

Alexey Kopytov

unread,
May 24, 2013, 1:35:15 AM5/24/13
to percona-d...@googlegroups.com
Hi doug,

On Thu, 23 May 2013 15:16:47 -0700 (PDT), doug wrote:
> 130523 21:56:14 innobackupex: Connecting to MySQL server with DSN
> 'dbi:mysql:;mysql_read_default_file=/etc/my.cnf;mysql_read_default_group=xtrabackup;mysql_socket=/var/run/mysqld/mysqld.sock'
> as 'xrepl' (using password: YES).
> ^GCharacter set 'utf8mb4' is not a compiled character set and is not
> specified in the '/usr/share/mysql/charsets/Index.xml' file
> ERROR: Failed to connect to MySQL server: DBI
> connect(';mysql_read_default_file=/etc/my.cnf;mysql_read_default_group=xtrabackup;mysql_socket=/var/run/mysqld/mysqld.sock','xrepl',...)
> failed: Can't initialize character set utf8mb4 (path:
> /usr/share/mysql/charsets/) at /usr/bin/innobackupex line 1384
>
> Is this a known bug?
>

It appears to be a DBD::mysql issue in old Ubuntu distributions. In
Ubuntu 10.04 DBD::mysql is linked against libmysqlclient16, i.e. the 5.1
client library. However, utf8mb4 is only supported in 5.5, which means
any DBD::MySQL utility on Ubuntu 10.04 is unable to connect to 5.5
servers if utf8mb4 is used as the default character set.

The workaround is to add "default-character-set=latin1" to either
[client] or [xtrabackup] group in my.cnf.

/Alexey

Raghavendra D Prabhu

unread,
May 24, 2013, 8:25:09 AM5/24/13
to percona-d...@googlegroups.com
Hi,
Speaking of old DBD::MySQL and Perl,
http://www.mysqlperformanceblog.com/2013/02/22/centos-5-users-your-utf-8
-data-is-in-peril-with-perl/ may also be useful.


>/Alexey
>
>--
>You received this message because you are subscribed to the Google Groups "Percona Discussion" group.
>To unsubscribe from this group and stop receiving emails from it, send an email to percona-discuss...@googlegroups.com.
>To post to this group, send email to percona-d...@googlegroups.com.
>For more options, visit https://groups.google.com/groups/opt_out.
>
>




Regards,
--
Raghavendra Prabhu
Percona LLC. - http://www.percona.com / Blog: http://www.mysqlperformanceblog.com/
Skype: percona.raghavendrap
GPG: 0xD72BE977
Contact: http://wnohang.net/contact

Make plans to attend Percona Live London MySQL Conference
2013.<http://www.percona.com/live/london-2013/>

do...@pagerduty.com

unread,
May 29, 2013, 2:09:17 PM5/29/13
to percona-d...@googlegroups.com
Hi Alexey,

On Thursday, May 23, 2013 10:35:15 PM UTC-7, Alexey Kopytov wrote:
It appears to be a DBD::mysql issue in old Ubuntu distributions. In
Ubuntu 10.04 DBD::mysql is linked against libmysqlclient16, i.e. the 5.1
client library. However, utf8mb4 is only supported in 5.5, which means
any DBD::MySQL utility on Ubuntu 10.04 is unable to connect to 5.5
servers if utf8mb4 is used as the default character set.

The workaround is to add "default-character-set=latin1" to either
[client] or [xtrabackup] group in my.cnf.


Ah, that makes sense. Since we have data that requires utf8mb4 to be stored correctly, do I have to worry about xtrabackup using a different character set when connecting to the DB? Is that connection used to process any data stored in our tables?

Ovais Tariq

unread,
May 30, 2013, 3:02:53 AM5/30/13
to percona-d...@googlegroups.com
Hi Doug,


No you need not worry about the character-set that would be used by innobackupex. It does not connect to the server to dump or process any of your data or anything else, since XtraBackup is basically a binary backup tool. 
 

--
You received this message because you are subscribed to the Google Groups "Percona Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to percona-discuss...@googlegroups.com.
To post to this group, send email to percona-d...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--

Ovais Tariq, Principal Support Engineer, Percona

http://www.percona.com | http://www.mysqlperformanceblog.com
Phone               : +1 (888) 401-3401 Ext. 552
24/7 Emergency : +1 888 401 3401 ext 911
Skype               : ovaistariq

Training : http://www.percona.com/training/
Support  : http://www.percona.com/mysql-support/


Percona Live London MySQL Conference 2013
Reply all
Reply to author
Forward
0 new messages