# Upgrade bug tokudb gone missing or tokudb is buggy?

**URL:** <https://forums.percona.com/t/upgrade-bug-tokudb-gone-missing-or-tokudb-is-buggy/5596>\
**Category:** Other MySQL® Questions\
**Created:** [May 15, 2017, 12:42am UTC](https://forums.percona.com/t/upgrade-bug-tokudb-gone-missing-or-tokudb-is-buggy/5596 "2017-05-15T00:42:58Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![newtomysql](https://avatars.discourse-cdn.com/v4/letter/n/a183cd/32.png) [@newtomysql](https://forums.percona.com/u/newtomysql)\
**Post date:** [May 15, 2017, 12:42am UTC](https://forums.percona.com/t/upgrade-bug-tokudb-gone-missing-or-tokudb-is-buggy/5596/1 "2017-05-15T00:42:58Z")

</div>

Hi All,  
Below was my current.

# Percona Server template configuration

[mysqld]

# 

# Remove leading # and set to the amount of RAM for the most important data

# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.

# innodb\_buffer\_pool\_size = 128M

# 

# Remove leading # to turn on a very important data integrity option: logging

# changes to the binary log between backups.

# log\_bin

# 

# Remove leading # to set options mainly useful for reporting servers.

# The server defaults are faster for transactions and fast SELECTs.

# Adjust sizes as needed, experiment to find the optimal values.

# join\_buffer\_size = 128M

# sort\_buffer\_size = 2M

# read\_rnd\_buffer\_size = 2M

datadir=/var/lib/mysql  
socket=/var/lib/mysql/mysql.sock

# Disabling symbolic-links is recommended to prevent assorted security risks

symbolic-links=0

log-error=/var/log/mysqld.log  
pid-file=/var/run/mysqld/mysqld.pid  
#default-storage-engine=tokudb

What I did what yum update and my mysql got updated.

## Below is the updates Updating : Percona-Server-shared-compat-57-5.7.18-14.1.el7.x86\_64 1/10 Updating : Percona-Server-shared-57-5.7.18-14.1.el7.x86\_64 2/10 Updating : Percona-Server-client-57-5.7.18-14.1.el7.x86\_64 3/10 Updating : Percona-Server-server-57-5.7.18-14.1.el7.x86\_64 4/10

- The suggested mysql options and settings are in /etc/percona-server.conf.d/mysqld.cnf
- If you want to use mysqld.cnf as default configuration file please make backup of /etc/my.cnf
- Once it is done please execute the following commands:  
rm -rf /etc/my.cnf  
update-alternatives --install /etc/my.cnf my.cnf “/etc/percona-server.cnf” 200

* * *

Percona Server is distributed with several useful UDF (User Defined Function) from Percona Toolkit.  
Run the following commands to create these functions:  
mysql -e “CREATE FUNCTION fnv1a\_64 RETURNS INTEGER SONAME ‘libfnv1a\_udf.so’”  
mysql -e “CREATE FUNCTION fnv\_64 RETURNS INTEGER SONAME ‘libfnv\_udf.so’”  
mysql -e “CREATE FUNCTION murmur\_hash RETURNS INTEGER SONAME ‘libmurmur\_udf.so’”  
See [http://www.percona.com/doc/percona-server/5.7/management/udf\_percona\_toolkit.html](http://www.percona.com/doc/percona-server/5.7/management/udf_percona_toolkit.html) for more details  
Updating : Percona-Server-tokudb-57-5.7.18-14.1.el7.x86\_64 5/10  
Cleanup : Percona-Server-tokudb-57-5.7.17-13.1.el7.x86\_64 6/10  
Cleanup : Percona-Server-server-57-5.7.17-13.1.el7.x86\_64 7/10  
Cleanup : Percona-Server-client-57-5.7.17-13.1.el7.x86\_64 8/10  
Cleanup : Percona-Server-shared-57-5.7.17-13.1.el7.x86\_64 9/10  
Cleanup : Percona-Server-shared-compat-57-5.7.17-13.1.el7.x86\_64 10/10  
Verifying : Percona-Server-tokudb-57-5.7.18-14.1.el7.x86\_64 1/10  
Verifying : Percona-Server-shared-57-5.7.18-14.1.el7.x86\_64 2/10  
Verifying : Percona-Server-server-57-5.7.18-14.1.el7.x86\_64 3/10  
Verifying : Percona-Server-shared-compat-57-5.7.18-14.1.el7.x86\_64 4/10  
Verifying : Percona-Server-client-57-5.7.18-14.1.el7.x86\_64 5/10  
Verifying : Percona-Server-server-57-5.7.17-13.1.el7.x86\_64 6/10  
Verifying : Percona-Server-shared-compat-57-5.7.17-13.1.el7.x86\_64 7/10  
Verifying : Percona-Server-tokudb-57-5.7.17-13.1.el7.x86\_64 8/10  
Verifying : Percona-Server-shared-57-5.7.17-13.1.el7.x86\_64 9/10  
Verifying : Percona-Server-client-57-5.7.17-13.1.el7.x86\_64 10/10

Updated:  
Percona-Server-client-57.x86\_64 0:5.7.18-14.1.el7  
Percona-Server-server-57.x86\_64 0:5.7.18-14.1.el7  
Percona-Server-shared-57.x86\_64 0:5.7.18-14.1.el7  
Percona-Server-shared-compat-57.x86\_64 0:5.7.18-14.1.el7  
Percona-Server-tokudb-57.x86\_64 0:5.7.18-14.1.el7

Complete!

After this the tokudb is not being recognised any more my mysql stopped to restart. I had to comment the tokudb then mysql can start now. Below is part of mysql log.

2017-05-15T06:03:05.862770Z 0 [Note] InnoDB: Created parallel doublewrite buffer at /var/lib/mysql/xb\_doublewrite, size 3932160 bytes  
2017-05-15T06:03:05.946047Z 0 [Note] InnoDB: Renaming log file ./ib\_logfile101 to ./ib\_logfile0  
2017-05-15T06:03:05.946134Z 0 [Warning] InnoDB: New log files created, LSN=45790  
2017-05-15T06:03:05.946160Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables  
2017-05-15T06:03:05.946222Z 0 [Note] InnoDB: Setting file ‘./ibtmp1’ size to 12 MB. Physically writing the file full; Please wait …  
2017-05-15T06:03:06.096069Z 0 [Note] InnoDB: File ‘./ibtmp1’ size is now 12 MB.  
2017-05-15T06:03:06.096267Z 0 [Note] InnoDB: Doublewrite buffer not found: creating new  
2017-05-15T06:03:06.296244Z 0 [Note] InnoDB: Doublewrite buffer created  
2017-05-15T06:03:06.310384Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.  
2017-05-15T06:03:06.310410Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.  
2017-05-15T06:03:06.310601Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.  
2017-05-15T06:03:06.354573Z 0 [Note] InnoDB: Foreign key constraint system tables created  
2017-05-15T06:03:06.354637Z 0 [Note] InnoDB: Creating tablespace and datafile system tables.  
2017-05-15T06:03:06.387884Z 0 [Note] InnoDB: Tablespace and datafile system tables created.  
2017-05-15T06:03:06.387937Z 0 [Note] InnoDB: Creating sys\_virtual system tables.  
2017-05-15T06:03:06.421245Z 0 [Note] InnoDB: sys\_virtual table created  
2017-05-15T06:03:06.421303Z 0 [Note] InnoDB: Creating zip\_dict and zip\_dict\_cols system tables.  
2017-05-15T06:03:06.454581Z 0 [Note] InnoDB: zip\_dict and zip\_dict\_cols system tables created.  
2017-05-15T06:03:06.454793Z 0 [Note] InnoDB: Waiting for purge to start  
2017-05-15T06:03:06.504972Z 0 [Note] InnoDB: Percona XtraDB ([http://www.percona.com](http://www.percona.com)) 5.7.18-14 started; log sequence number 0  
2017-05-15T06:03:06.505428Z 0 [Note] Plugin ‘FEDERATED’ is disabled.  
2017-05-15T06:03:06.510037Z 0 [Warning] InnoDB: Cannot open table mysql/plugin from the internal data dictionary of InnoDB though the .frm file for the table exists. Please refer to [http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting.html](http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting.html) for how to resolve the issue.  
mysqld: Table ‘mysql.plugin’ doesn’t exist  
2017-05-15T06:03:06.510134Z 0 [ERROR] Can’t open the mysql.plugin table. Please run mysql\_upgrade to create it.  
2017-05-15T06:03:06.511046Z 0 [Warning] InnoDB: Cannot open table mysql/gtid\_executed from the internal data dictionary of InnoDB though the .frm file for the table exists. Please refer to [http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting.html](http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting.html) for how to resolve the issue.  
mysqld: Table ‘mysql.gtid\_executed’ doesn’t exist  
2017-05-15T06:03:06.511091Z 0 [Warning] Gtid table is not ready to be used. Table ‘mysql.gtid\_executed’ cannot be opened.  
2017-05-15T06:03:06.514560Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.  
2017-05-15T06:03:06.514581Z 0 [Note] Skipping generation of SSL certificates as certificate files are present in data directory.  
2017-05-15T06:03:06.536783Z 0 [Warning] CA certificate ca.pem is self signed.  
2017-05-15T06:03:06.536866Z 0 [Note] Skipping generation of RSA key pair as key files are present in data directory.  
2017-05-15T06:03:06.537595Z 0 [Note] Server hostname (bind-address): ‘\*’; port: 3306  
2017-05-15T06:03:06.537649Z 0 [Note] IPv6 is available.  
2017-05-15T06:03:06.537671Z 0 [Note] - ‘::’ resolves to ‘::’;  
2017-05-15T06:03:06.537754Z 0 [Note] Server socket created on IP: ‘::’.  
2017-05-15T06:03:06.571570Z 0 [Warning] InnoDB: Cannot open table mysql/server\_cost from the internal data dictionary of InnoDB though the .frm file for the table exists. Please refer to [http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting.html](http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting.html) for how to resolve the issue.  
2017-05-15T06:03:06.571611Z 0 [Warning] Failed to open optimizer cost constant tables

2017-05-15T06:03:06.572621Z 0 [Warning] InnoDB: Cannot open table mysql/time\_zone\_leap\_second from the internal data dictionary of InnoDB though the .frm file for the table exists. Please refer to [http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting.html](http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting.html) for how to resolve the issue.  
2017-05-15T06:03:06.572655Z 0 [Warning] Can’t open and lock time zone table: Table ‘mysql.time\_zone\_leap\_second’ doesn’t exist trying to live without them  
2017-05-15T06:03:06.573327Z 0 [Warning] InnoDB: Cannot open table mysql/servers from the internal data dictionary of InnoDB though the .frm file for the table exists. Please refer to [http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting.html](http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting.html) for how to resolve the issue.  
2017-05-15T06:03:06.573357Z 0 [ERROR] Can’t open and lock privilege tables: Table ‘mysql.servers’ doesn’t exist  
2017-05-15T06:03:06.582207Z 0 [Note] Event Scheduler: Loaded 0 events  
2017-05-15T06:03:06.582530Z 0 [Note] /usr/sbin/mysqld: ready for connections.  
Version: ‘5.7.18-14’ socket: ‘/var/lib/mysql/mysql.sock’ port: 3306 Percona Server (GPL), Release 14, Revision 2c06f4d  
2017-05-15T06:03:06.582552Z 0 [Note] Executing ‘SELECT \* FROM INFORMATION\_SCHEMA.TABLES;’ to get a list of tables using the deprecated partition engine. You may use the startup option ‘–disable-partition-engine-check’ to skip this check.  
2017-05-15T06:03:06.582560Z 0 [Note] Beginning of list of non-natively partitioned tables  
2017-05-15T06:03:06.606414Z 0 [Note] End of list of non-natively partitioned tables

I tried running this even this failed. Is tokudb bugging should I move back to innodb ?

ps\_tokudb\_admin --enable -uroot -p

Installing TokuDB engine…  
ERROR: Failed to install TokuDB engine plugin. Please check error log.

What should I do now I can open my tokudb database and their files?

---

<div class="post-metadata">

**Author:** ![hrvojem](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/hrvojem/32/6_2.png) [@hrvojem](https://forums.percona.com/u/hrvojem)\
**Post date:** [May 15, 2017, 2:42am UTC](https://forums.percona.com/t/upgrade-bug-tokudb-gone-missing-or-tokudb-is-buggy/5596/2 "2017-05-15T02:42:27Z")

</div>

Have you tried running mysql\_upgrade as suggested in the error log?

> [@](#):
>
> 2017-05-15T06:03:06.510134Z 0 [ERROR] Can’t open the mysql.plugin table. Please run mysql\_upgrade to create it

---

<div class="post-metadata">

**Author:** ![newtomysql](https://avatars.discourse-cdn.com/v4/letter/n/a183cd/32.png) [@newtomysql](https://forums.percona.com/u/newtomysql)\
**Post date:** [May 15, 2017, 2:45am UTC](https://forums.percona.com/t/upgrade-bug-tokudb-gone-missing-or-tokudb-is-buggy/5596/3 "2017-05-15T02:45:14Z")

</div>

Hi Hrvojem,  
Yes tried nothing happened. I just cannot even start my whole db. Cause it say the mysql folder is missing? I need dire help? What should I do now ?

---

<div class="post-metadata">

**Author:** ![newtomysql](https://avatars.discourse-cdn.com/v4/letter/n/a183cd/32.png) [@newtomysql](https://forums.percona.com/u/newtomysql)\
**Post date:** [May 15, 2017, 2:49am UTC](https://forums.percona.com/t/upgrade-bug-tokudb-gone-missing-or-tokudb-is-buggy/5596/4 "2017-05-15T02:49:34Z")

</div>

Hi Hrvojem,  
I even tried with the --force option still same. Now is even worse the mysql just failed to even start.Below is my full log. I notice the whole of the mysql folder is missing and gone I Just rename it to mysql\_old and its gone I did not delete.

2017-05-15T08:16:21.989685Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit\_defaults\_for\_timestamp server option (see documentation for more details).  
2017-05-15T08:16:21.991096Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.18-14) starting as process 17549 …  
2017-05-15T08:16:21.994995Z 0 [Note] InnoDB: PUNCH HOLE support available  
2017-05-15T08:16:21.995025Z 0 [Note] InnoDB: Mutexes and rw\_locks use GCC atomic builtins  
2017-05-15T08:16:21.995033Z 0 [Note] InnoDB: Uses event mutexes  
2017-05-15T08:16:21.995039Z 0 [Note] InnoDB: GCC builtin \_\_atomic\_thread\_fence() is used for memory barrier  
2017-05-15T08:16:21.995051Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.7  
2017-05-15T08:16:21.995058Z 0 [Note] InnoDB: Using Linux native AIO  
2017-05-15T08:16:21.995315Z 0 [Note] InnoDB: Number of pools: 1  
2017-05-15T08:16:21.995419Z 0 [Note] InnoDB: Using CPU crc32 instructions  
2017-05-15T08:16:21.996746Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M  
2017-05-15T08:16:22.000644Z 0 [Note] InnoDB: Completed initialization of buffer pool  
2017-05-15T08:16:22.002515Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().  
2017-05-15T08:16:22.014556Z 0 [Note] InnoDB: Crash recovery did not find the parallel doublewrite buffer at /var/lib/mysql/xb\_doublewrite  
2017-05-15T08:16:22.015682Z 0 [Note] InnoDB: Highest supported file format is Barracuda.  
2017-05-15T08:16:22.128603Z 0 [Note] InnoDB: Created parallel doublewrite buffer at /var/lib/mysql/xb\_doublewrite, size 3932160 bytes  
2017-05-15T08:16:22.137007Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables  
2017-05-15T08:16:22.137124Z 0 [Note] InnoDB: Setting file ‘./ibtmp1’ size to 12 MB. Physically writing the file full; Please wait …  
2017-05-15T08:16:22.287003Z 0 [Note] InnoDB: File ‘./ibtmp1’ size is now 12 MB.  
2017-05-15T08:16:22.289087Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.  
2017-05-15T08:16:22.289113Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.  
2017-05-15T08:16:22.289595Z 0 [Note] InnoDB: Waiting for purge to start  
2017-05-15T08:16:22.339830Z 0 [Note] InnoDB: Percona XtraDB ([http://www.percona.com](http://www.percona.com)) 5.7.18-14 started; log sequence number 1221672  
2017-05-15T08:16:22.340195Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib\_buffer\_pool  
2017-05-15T08:16:22.340261Z 0 [Note] Plugin ‘FEDERATED’ is disabled.  
mysqld: Table ‘mysql.plugin’ doesn’t exist  
2017-05-15T08:16:22.340458Z 0 [ERROR] Can’t open the mysql.plugin table. Please run mysql\_upgrade to create it.  
2017-05-15T08:16:22.340534Z 0 [Note] InnoDB: Buffer pool(s) load completed at 170515 4:16:22  
2017-05-15T08:16:22.341311Z 0 [Warning] Gtid table is not ready to be used. Table ‘mysql.gtid\_executed’ cannot be opened.  
2017-05-15T08:16:22.345350Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.  
2017-05-15T08:16:22.345373Z 0 [Note] Skipping generation of SSL certificates as certificate files are present in data directory.  
2017-05-15T08:16:22.368654Z 0 [Warning] CA certificate ca.pem is self signed.  
2017-05-15T08:16:22.368754Z 0 [Note] Skipping generation of RSA key pair as key files are present in data directory.  
2017-05-15T08:16:22.369436Z 0 [Note] Server hostname (bind-address): ‘\*’; port: 3306  
2017-05-15T08:16:22.369489Z 0 [Note] IPv6 is available.  
2017-05-15T08:16:22.369511Z 0 [Note] - ‘::’ resolves to ‘::’;  
2017-05-15T08:16:22.369574Z 0 [Note] Server socket created on IP: ‘::’.  
2017-05-15T08:16:22.403940Z 0 [Warning] Failed to open optimizer cost constant tables

2017-05-15T08:16:22.404125Z 0 [ERROR] Fatal error: Can’t open and lock privilege tables: Table ‘mysql.user’ doesn’t exist  
2017-05-15T08:16:22.404215Z 0 [ERROR] Aborting

---

<div class="post-metadata">

**Author:** ![hrvojem](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/hrvojem/32/6_2.png) [@hrvojem](https://forums.percona.com/u/hrvojem)\
**Post date:** [May 15, 2017, 3:13am UTC](https://forums.percona.com/t/upgrade-bug-tokudb-gone-missing-or-tokudb-is-buggy/5596/5 "2017-05-15T03:13:27Z")

</div>

Which folder is empty mysql or mysql\_old? Did you update the datadir in your config to point to the new (mysql\_old) folder, from the logs it looks like it’s still looking for data/logs in the /var/lib/mysql?

---

<div class="post-metadata">

**Author:** ![newtomysql](https://avatars.discourse-cdn.com/v4/letter/n/a183cd/32.png) [@newtomysql](https://forums.percona.com/u/newtomysql)\
**Post date:** [May 15, 2017, 3:19am UTC](https://forums.percona.com/t/upgrade-bug-tokudb-gone-missing-or-tokudb-is-buggy/5596/6 "2017-05-15T03:19:29Z")

</div>

Hi,  
There is no more folder mysql any more ready. I never change any thing on the datadir? Where to change that ? So what should I change now? I am using currently the safe version of mysqld.conf. But when I run ls -la I cant see the mysql\_old folder any more ? There is no more mysql folder at all and neither the mysql\_old folder.

---

<div class="post-metadata">

**Author:** ![hrvojem](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/hrvojem/32/6_2.png) [@hrvojem](https://forums.percona.com/u/hrvojem)\
**Post date:** [May 15, 2017, 3:23am UTC](https://forums.percona.com/t/upgrade-bug-tokudb-gone-missing-or-tokudb-is-buggy/5596/7 "2017-05-15T03:23:12Z")

</div>

Hi,

You said

> [@](#):
>
> I notice the whole of the mysql folder is missing and gone I Just rename it to mysql\_old and its gone I did not delete.

. How did you rename it? Is the renamed folder also empty if you do ls -la?

---

<div class="post-metadata">

**Author:** ![newtomysql](https://avatars.discourse-cdn.com/v4/letter/n/a183cd/32.png) [@newtomysql](https://forums.percona.com/u/newtomysql)\
**Post date:** [May 15, 2017, 3:30am UTC](https://forums.percona.com/t/upgrade-bug-tokudb-gone-missing-or-tokudb-is-buggy/5596/8 "2017-05-15T03:30:14Z")

</div>

Hi,  
I just went to the mysql folder and rename it via my sftp application. There after I see it gone missing no more there. When I run this ls -la I dont see it any more neither via sftp? so what is best way to salvage this now ?

---

<div class="post-metadata">

**Author:** ![hrvojem](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/hrvojem/32/6_2.png) [@hrvojem](https://forums.percona.com/u/hrvojem)\
**Post date:** [May 15, 2017, 3:33am UTC](https://forums.percona.com/t/upgrade-bug-tokudb-gone-missing-or-tokudb-is-buggy/5596/9 "2017-05-15T03:33:05Z")

</div>

You don’t see neither the renamed folder or the (older) mysql folder  
as well?

---

<div class="post-metadata">

**Author:** ![newtomysql](https://avatars.discourse-cdn.com/v4/letter/n/a183cd/32.png) [@newtomysql](https://forums.percona.com/u/newtomysql)\
**Post date:** [May 15, 2017, 3:34am UTC](https://forums.percona.com/t/upgrade-bug-tokudb-gone-missing-or-tokudb-is-buggy/5596/10 "2017-05-15T03:34:06Z")

</div>

Yes I dont see the renamed folder.

---

<div class="post-metadata">

**Author:** ![hrvojem](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/hrvojem/32/6_2.png) [@hrvojem](https://forums.percona.com/u/hrvojem)\
**Post date:** [May 15, 2017, 3:40am UTC](https://forums.percona.com/t/upgrade-bug-tokudb-gone-missing-or-tokudb-is-buggy/5596/11 "2017-05-15T03:40:33Z")

</div>

The only option then if you don’t see neither is to restore the folder from the last backup.

---

<div class="post-metadata">

**Author:** ![newtomysql](https://avatars.discourse-cdn.com/v4/letter/n/a183cd/32.png) [@newtomysql](https://forums.percona.com/u/newtomysql)\
**Post date:** [May 15, 2017, 3:43am UTC](https://forums.percona.com/t/upgrade-bug-tokudb-gone-missing-or-tokudb-is-buggy/5596/12 "2017-05-15T03:43:18Z")

</div>

Hi,  
So are you saying completely yum remove mysql and reinstall and reinstall it?The problem now is that I cannot start my mysql. I did nnot do any back up cause I was just testing for tokudb. Why after upgrade this issue happened? Is there anything I should be careful with tokudb or its not stable yet. How can I restore from my .frm files the table schem?

---

<div class="post-metadata">

**Author:** ![newtomysql](https://avatars.discourse-cdn.com/v4/letter/n/a183cd/32.png) [@newtomysql](https://forums.percona.com/u/newtomysql)\
**Post date:** [May 15, 2017, 4:08am UTC](https://forums.percona.com/t/upgrade-bug-tokudb-gone-missing-or-tokudb-is-buggy/5596/13 "2017-05-15T04:08:26Z")

</div>

Hi,  
In future when I back up must i also back up the mysql folder? What is your opinion about tokudb is it safe to use or should I revert to innodb I am worried if I continue to use it and then I end up again another problem with the next upgrade? I really need you expert opinion on this to continue or keep working with innodb ? Please help on this.

---

<div class="post-metadata">

**Author:** ![hrvojem](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/hrvojem/32/6_2.png) [@hrvojem](https://forums.percona.com/u/hrvojem)\
**Post date:** [May 15, 2017, 4:12am UTC](https://forums.percona.com/t/upgrade-bug-tokudb-gone-missing-or-tokudb-is-buggy/5596/14 "2017-05-15T04:12:10Z")

</div>

I’m not sure what happened, I’ve tried testing this locally and I can’t reproduce it. The upgrade process should look like this (even without the TokuDB):

1. run yum update
2. run mysql\_upgrade
3. restart the mysql service

You shouldn’t see any errors in the error\_log. In case you’ve done this and you’re unable to start the service or there are errors in the log please file a bug here ([url][https://bugs.launchpad.net/percona-server/+filebug[/url]](https://bugs.launchpad.net/percona-server/+filebug%5B/url%5D)).

To restore the table schema from .frm files you can use the mysqlfrm from the mysql-utilities (available here: [url][MySQL :: Download MySQL Utilities (Archived Versions)](https://dev.mysql.com/downloads/utilities/%5B/url%5D))

To restore it you can run a command like this:

```auto
[root&#64;centos7 ~]# mysqlfrm --diagnostic /var/lib/mysql/world/City.frm
# WARNING: Cannot generate character set or collation names without the --server option.
# CAUTION: The diagnostic mode is a best-effort parse of the .frm file. As such, it may not identify all of the components of the table correctly. This is especially true for damaged files. It will also not read the default values for the columns and the resulting statement may not be syntactically correct.
# Reading .frm file for /var/lib/mysql/world/City.frm:
# The .frm file is a TABLE.
# CREATE TABLE Statement:

CREATE TABLE `world`.`City` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`Name` char(35) NOT NULL,
`CountryCode` char(3) NOT NULL,
`District` char(20) NOT NULL,
`Population` int(11) NOT NULL,
PRIMARY KEY `PRIMARY` (`ID`),
KEY `CountryCode` (`CountryCode`)
) ENGINE=TokuDB;

#...done.

```

---

<div class="post-metadata">

**Author:** ![newtomysql](https://avatars.discourse-cdn.com/v4/letter/n/a183cd/32.png) [@newtomysql](https://forums.percona.com/u/newtomysql)\
**Post date:** [May 15, 2017, 4:18am UTC](https://forums.percona.com/t/upgrade-bug-tokudb-gone-missing-or-tokudb-is-buggy/5596/15 "2017-05-15T04:18:52Z")

</div>

Hi,  
I am also puzzle what happened till all failed. Ok in future what you suggest run yum update. There after run mysql\_upgrade is it? I notice this mysql folder is very crucial is it a need for it to be backed up too? So now the only option is yum remove the whole mysql right or is there any other solution to this? Then after I install the brand new mysql. I still have my tokudb files etc can I restore them in my new installation? What is best way to move forward? How to restore from my current tokudb files is that possible rather ?

---

<div class="post-metadata">

**Author:** ![hrvojem](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/hrvojem/32/6_2.png) [@hrvojem](https://forums.percona.com/u/hrvojem)\
**Post date:** [May 15, 2017, 6:11am UTC](https://forums.percona.com/t/upgrade-bug-tokudb-gone-missing-or-tokudb-is-buggy/5596/16 "2017-05-15T06:11:11Z")

</div>

Hi,

> [@](#):
>
> I notice this mysql folder is very crucial is it a need for it to be backed up too?

Depends on the type of backups you’re running, but you should be able to restore it from both logical (taken with mysqldump) or physical (taken with XtraBackup or TokuBackup) if you backed up all the databases.

> [@](#):
>
> So now the only option is yum remove the whole mysql right or is there any other solution to this?

I think you should first figure out where the renamed folder went.

> [@](#):
>
> I still have my tokudb files etc can I restore them in my new installation? What is best way to move forward? How to restore from my current tokudb files is that possible rather ?

You can restore the files from the last backup, if you’ve used mysqldump to take the backup you can insert/restore them back the same way you’d do it for InnoDB files.

---

<div class="post-metadata">

**Author:** ![newtomysql](https://avatars.discourse-cdn.com/v4/letter/n/a183cd/32.png) [@newtomysql](https://forums.percona.com/u/newtomysql)\
**Post date:** [May 15, 2017, 6:44am UTC](https://forums.percona.com/t/upgrade-bug-tokudb-gone-missing-or-tokudb-is-buggy/5596/17 "2017-05-15T06:44:00Z")

</div>

Hi,  
I normally only took mysqldump backups. I never tried before xtrabackup or tokubackup. Actually this is my first time trying percona mysql previously I have been using oracle mysql which comes with centos. Unfortunately I did not do any backup neither mysqldump too. So with the existing folder of my db with the tokudb files is there anyway I can restore my db or it not possible?

For the renamed folder I have tried all method its just not there. Where else you think it would have gone or any commands I can run to find out cause I tried ls -la nothing is showing via it.

How mature and reliable is tokudb is there still many bug or is it safe to use for production?

---

<div class="post-metadata">

**Author:** ![George\_Lorch](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/george_lorch/32/1108_2.png) [@George\_Lorch](https://forums.percona.com/u/George_Lorch)\
**Post date:** [May 15, 2017, 9:56am UTC](https://forums.percona.com/t/upgrade-bug-tokudb-gone-missing-or-tokudb-is-buggy/5596/18 "2017-05-15T09:56:28Z")

</div>

> [@newtomysql;48416](#):
>
> Hi,  
> In future when I back up must i also back up the mysql folder? What is your opinion about tokudb is it safe to use or should I revert to innodb I am worried if I continue to use it and then I end up again another problem with the next upgrade? I really need you expert opinion on this to continue or keep working with innodb ? Please help on this.

My typical advice is that unless you have a very specific reason to use TokuDB, meaning that you have tested and understand the performance tradeoffs, the backup/restore limitations, etc…, then you should stick to InnoDB as you will not likely be very happy with your results. TokuDB is quite mature and used in production with multiple PB of data, but it is NOT intended to be a blind drop in for InnoDB to be ‘better’ in all ways. It solves a specific set of storage capacity problems (compression) and performance problems (write heavy workloads) for huge data sets which comes with trade-offs for read performance and less community feature support than InnoDB.

---

<div class="post-metadata">

**Author:** ![newtomysql](https://avatars.discourse-cdn.com/v4/letter/n/a183cd/32.png) [@newtomysql](https://forums.percona.com/u/newtomysql)\
**Post date:** [May 15, 2017, 11:42am UTC](https://forums.percona.com/t/upgrade-bug-tokudb-gone-missing-or-tokudb-is-buggy/5596/19 "2017-05-15T11:42:20Z")

</div>

Hi Georgelorch,  
I am expecting data to reach on monthly basis to be few hundred millions of lines in near future as weekly I am reaching almost 50 million lines. So far with oracle mysql things are working but off course if not so fast. I agree I am not going to do a blind swap to Tokudb I have been reading but I agree there is not much help and find quite a number of issue with it only thing is that was looking around the insert speed but you highlighted that there will be issue with read performance so is kind of tradeoff then. So what is your suggestion based on my scenario say monthly I will have data reaching around close to 300 million will innodb be good for it?

---

<div class="post-metadata">

**Author:** ![George\_Lorch](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/george_lorch/32/1108_2.png) [@George\_Lorch](https://forums.percona.com/u/George_Lorch)\
**Post date:** [May 15, 2017, 2:23pm UTC](https://forums.percona.com/t/upgrade-bug-tokudb-gone-missing-or-tokudb-is-buggy/5596/20 "2017-05-15T14:23:27Z")

</div>

> [@newtomysql;48426](#):
>
> Hi Georgelorch,  
> I am expecting data to reach on monthly basis to be few hundred millions of lines in near future as weekly I am reaching almost 50 million lines. So far with oracle mysql things are working but off course if not so fast. I agree I am not going to do a blind swap to Tokudb I have been reading but I agree there is not much help and find quite a number of issue with it only thing is that was looking around the insert speed but you highlighted that there will be issue with read performance so is kind of tradeoff then. So what is your suggestion based on my scenario say monthly I will have data reaching around close to 300 million will innodb be good for it?

It depends on your row size too, if you assume a small-ish row of say 128 bytes, then 300 million records is only ~38.5 GB. Within in the grand scheme of database things, this is fairly small. Properly tuned InnoDB can handle this easily, it is handling TB of data elsewhere in production.

[Next page](https://forums.percona.com/t/upgrade-bug-tokudb-gone-missing-or-tokudb-is-buggy/5596.md?page=2)
