On 13.1, moving from MySQL to MariaDB doesn't work

I’m using 13.1 64-bit. After zypper in mariadb, the database service won’t start.

Here’s mysqld-upgrade-run.log:

140131 10:30:54 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
140131 10:30:54 InnoDB: The InnoDB memory heap is disabled
140131 10:30:54 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140131 10:30:54 InnoDB: Compressed tables use zlib 1.2.8
140131 10:30:54 InnoDB: Using Linux native AIO
140131 10:30:54 InnoDB: Initializing buffer pool, size = 128.0M
140131 10:30:54 InnoDB: Completed initialization of buffer pool
140131 10:30:54 InnoDB: highest supported file format is Barracuda.
140131 10:30:54  InnoDB: Waiting for the background threads to start
140131 10:30:55 Percona XtraDB (http://www.percona.com) 5.5.33-MariaDB-31.1 started; log sequence number 1998988083
140131 10:30:55 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.5.33-MariaDB-log'  socket: '/var/tmp/mysql-protected.PI3uOt/mysql.sock'  port: 0  openSUSE package
140131 10:30:55 [ERROR] mysqld: Incorrect information in file: './mysql/innodb_index_stats.frm'
140131 10:30:55 [ERROR] mysqld: Incorrect information in file: './mysql/innodb_table_stats.frm'
140131 10:30:55 [ERROR] mysqld: Incorrect information in file: './mysql/procs_priv.frm'
140131 10:30:55  InnoDB: Warning: table 'mysql/slave_master_info'
InnoDB: in InnoDB data dictionary has unknown flags 10.
140131 10:30:55  InnoDB: Warning: table 'mysql/slave_relay_log_info'
InnoDB: in InnoDB data dictionary has unknown flags 10.
140131 10:30:55  InnoDB: Warning: table 'mysql/slave_worker_info'
InnoDB: in InnoDB data dictionary has unknown flags 10.
140131 10:30:55 [ERROR] mysqld: Incorrect information in file: './mysql/innodb_index_stats.frm'
140131 10:30:55 [ERROR] mysqld: Incorrect information in file: './mysql/innodb_table_stats.frm'
140131 10:30:55 [ERROR] mysqld: Incorrect information in file: './mysql/procs_priv.frm'
140131 10:30:55 [ERROR] mysqld: Incorrect information in file: './mysql/procs_priv.frm'
140131 10:30:55 [ERROR] mysqld: Incorrect information in file: './mysql/general_log.frm'
140131 10:30:55 [ERROR] mysqld: Incorrect information in file: './mysql/slow_log.frm'
140131 10:30:56 [ERROR] mysqld: Incorrect information in file: './mysql/general_log.frm'
140131 10:30:56 [ERROR] mysqld: Incorrect information in file: './mysql/slow_log.frm'
140131 10:30:57 [ERROR] mysqld: Incorrect information in file: './mysql/procs_priv.frm'
140131 10:30:57 [ERROR] mysqld: Incorrect information in file: './mysql/procs_priv.frm'
140131 10:30:57 [ERROR] mysqld: Incorrect information in file: './mysql/procs_priv.frm'
140131 10:30:57 [ERROR] mysqld: Incorrect information in file: './mysql/procs_priv.frm'
140131 10:30:57 [ERROR] mysqld: Incorrect information in file: './mysql/procs_priv.frm'
140131 10:30:58 [ERROR] mysqld: Incorrect information in file: './mysql/procs_priv.frm'
140131 10:30:58 [Note] /usr/sbin/mysqld: Normal shutdown

140131 10:30:59  InnoDB: Starting shutdown...
140131 10:31:00  InnoDB: Shutdown completed; log sequence number 1998988093
140131 10:31:00 [Note] /usr/sbin/mysqld: Shutdown complete

140131 10:31:00 mysqld_safe mysqld from pid file /var/tmp/mysql-protected.PI3uOt/mysqld.pid ended

And mysqld-upgrade.log:

Fri Jan 31 10:30:53 PST 2014 - upgrading MySQL...

Will update MySQL now, if you encounter any problems, please read following file:
        /usr/share/doc/packages/mariadb/README.SuSE
Running protected MySQL...
Upgrading MySQL...
   Phase 1/3: Fixing table and database names
   Phase 2/3: Checking and upgrading tables
   Processing databases
   information_schema
   misc
   mysql
   mysql.columns_priv                                 OK
   mysql.db                                           OK
   mysql.event                                        OK
   mysql.func                                         OK
   mysql.help_category                                OK
   mysql.help_keyword                                 OK
   mysql.help_relation                                OK
   mysql.help_topic                                   OK
   mysql.host                                         OK
   mysql.innodb_index_stats
   Error    : Incorrect information in file: './mysql/innodb_index_stats.frm'
   info    : Corrupt
   mysql.innodb_table_stats
   Error    : Incorrect information in file: './mysql/innodb_table_stats.frm'
   info    : Corrupt
   mysql.ndb_binlog_index                             OK
   mysql.plugin                                       OK
   mysql.proc                                         OK
   mysql.procs_priv
   Error    : Incorrect information in file: './mysql/procs_priv.frm'
   info    : Corrupt
   mysql.proxies_priv                                 OK
   mysql.servers                                      OK
   mysql.slave_master_info                            OK
   mysql.slave_relay_log_info                         OK
   mysql.slave_worker_info                            OK
   mysql.tables_priv                                  OK
   mysql.time_zone                                    OK
   mysql.time_zone_leap_second                        OK
   mysql.time_zone_name                               OK
   mysql.time_zone_transition                         OK
   mysql.time_zone_transition_type                    OK
   mysql.user                                         OK
   mysql.user_info                                    OK
   performance_schema
   test
   trac
   trac.attachment                                    OK
   trac.auth_cookie                                   OK
   trac.cache                                         OK
   trac.codereviewer                                  OK
   trac.codereviewer_map                              OK
   trac.component                                     OK
   trac.enum                                          OK
   trac.mastertickets                                 OK
   trac.milestone                                     OK
   trac.node_change                                   OK
   trac.permission                                    OK
   trac.report                                        OK
   trac.repository                                    OK
   trac.revision                                      OK
   trac.schedule                                      OK
   trac.schedule_change                               OK
   trac.session                                       OK
   trac.session_attribute                             OK
   trac.subtickets                                    OK
   trac.system                                        OK
   trac.ticket                                        OK
   trac.ticket_change                                 OK
   trac.ticket_custom                                 OK
   trac.version                                       OK
   trac.wiki                                          OK
   trac.work_log                                      OK

   Repairing tables
   mysql.innodb_index_stats
   Error    : Incorrect information in file: './mysql/innodb_index_stats.frm'
   info    : Corrupt
   mysql.innodb_table_stats
   Error    : Incorrect information in file: './mysql/innodb_table_stats.frm'
   info    : Corrupt
   mysql.procs_priv
   Error    : Incorrect information in file: './mysql/procs_priv.frm'
   info    : Corrupt
   Phase 3/3: Running 'mysql_fix_privilege_tables'...

pls, how to fix, this is a production system :’(

Why don’t you just install mysql and continue using that?

If you want to switch to MariaDB you could then dump your databases first, delete everything to start fresh, and import then your databases into MariaDB.

You don’t say what version of MySQL you had installed; there are known problems involved in some moves from MySQL to MariaDB where the main version numbers do not match. Follow wolfi323’s advice.

It’s MySQL 5.6.

I cannot use MySQL because the native connector is GPL, whereas it is LGPL for MariaDB. So I really need to get this running. What are the catches if I do a dump and reimport? It sounds too simple.

Recommend you just setup a trial migrating data to a test MySQL (or MariaDB).
Generally there are 2 main ways to migrate a database(There are also a few minor variations like shipping between live running instances)

  • The “forklift” method. You simply detach a database, copy the file(s) to the new machine and re-attach. Although quick and easy if it works, there are numerous requirements for a successful migration
  • The “Dump and Import” as described. The idea is to get the data out of a database into a generic form, then import into the new Database app. Because the data is in a basic, generic format in its intermediate step, there are fewer restrictions and the likelihood of success is higher.

HTH,
TSU

That is why you are having problems; MySQL←→MariaDB compatibility only goes up to 5.5.

It is the recommended way: see https://mariadb.com/kb/en/mysqldump/ for any possible catches.