Bug #78495 Table 'mysql.gtid_executed' cannot be opened.
Submitted: 21 Sep 2015 5:17 Modified: 21 Nov 2016 6:49
Reporter: Roel Van de Paar Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Replication Severity:S1 (Critical)
Version:5.7.8 (RC2), 5.7.10, 8.0.0 OS:Any
Assigned to: CPU Architecture:Any

[21 Sep 2015 5:17] Roel Van de Paar
Description:
2015-09-21T05:05:54.203741Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.

How to repeat:
./bin/mysqld --initialize-insecure --basedir=${PWD} --datadir=${PWD}/data

Suggested fix:
Don't show this warning - create the table instead?
[21 Sep 2015 8:21] MySQL Verification Team
Hello Roel,

Thank you for the report.

Thanks,
Umesh
[21 Sep 2015 8:23] MySQL Verification Team
I confirmed that table is created and exists, may be some meaningful message in the warning?

// 5.7.10

[umshastr@hod03]/export/umesh/server/binaries/mysql-advanced-5.7.10: bin/mysqld --initialize-insecure --basedir=/export/umesh/server/binaries/mysql-advanced-5.7.10 --datadir=/export/umesh/server/binaries/mysql-advanced-5.7.10/78495 -v
.
.
2015-09-21T08:00:03.604691Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2015-09-21T08:00:04.585801Z 0 [Warning] CA certificate ca.pem is self signed.
2015-09-21T08:00:04.865362Z 1 [Warning] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
[umshastr@hod03]/export/umesh/server/binaries/mysql-advanced-5.7.10:
[umshastr@hod03]/export/umesh/server/binaries/mysql-advanced-5.7.10: ls -l 78495/mysql/gtid*
-rw-r----- 1 umshastr common  8784 Sep 21 10:00 78495/mysql/gtid_executed.frm
-rw-r----- 1 umshastr common 98304 Sep 21 10:00 78495/mysql/gtid_executed.ibd
[umshastr@hod03]/export/umesh/server/binaries/mysql-advanced-5.7.10:

// 5.8.0

[umshastr@hod03]/export/umesh/server/binaries/mysql-advanced-5.8.0: bin/mysqld --initialize-insecure --basedir=/export/umesh/server/binaries/mysql-advanced-5.8.0 --datadir=/export/umesh/server/binaries/mysql-advanced-5.8.0/78495 -v
.
.
2015-09-21T07:52:27.951129Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2015-09-21T07:52:29.322979Z 0 [Warning] CA certificate ca.pem is self signed.
2015-09-21T07:52:29.489510Z 1 [Warning] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
[umshastr@hod03]/export/umesh/server/binaries/mysql-advanced-5.8.0:

[umshastr@hod03]/export/umesh/server/binaries/mysql-advanced-5.8.0: ls -l 78495/mysql/gtid*
-rw-r----- 1 umshastr common  8784 Sep 21 09:52 78495/mysql/gtid_executed.frm
-rw-r----- 1 umshastr common 98304 Sep 21 09:52 78495/mysql/gtid_executed.ibd
[umshastr@hod03]/export/umesh/server/binaries/mysql-advanced-5.8.0:
[21 Sep 2015 23:18] Roel Van de Paar
Thanks Umesh for confirming the table exists. That makes it even more interesting.
[20 Jan 2016 4:12] Roel Van de Paar
Any updates? Seems like 5.7 GA bug?
[18 Jun 2016 21:28] Omer Barnir
Posted by developer:
 
Reported version value updated to reflect release name change from 5.8 to 8.0
[21 Nov 2016 6:49] Roel Van de Paar
Hi. This bug seems important. Any updates?
[21 Nov 2016 7:22] MySQL Verification Team
related blog ;)

http://datacharmer.blogspot.co.za/2015/08/in-search-of-cleanliness-elusive-silent.html
[21 Nov 2016 12:45] Wagner Bianchi
What do you guys think about this below test?

[root@test102546 mysql-5.7.16-linux-glibc2.5-x86_64]# bin/mysqld --no-defaults --initialize --user=mysql --datadir=${MYSQL_DATADIR} --basedir=${MYSQL_BASEDIR} --lc-messages-dir=./share/english/
2016-11-21T12:43:01.409585Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2016-11-21T12:43:01.409754Z 0 [Warning] Using pre 5.5 semantics to load error messages from /usr/local/mysql-5.7.16-linux-glibc2.5-x86_64/share/english/.
2016-11-21T12:43:01.409762Z 0 [Warning] If this is not intended, refer to the documentation for valid usage of --lc-messages-dir and --language parameters.
2016-11-21T12:43:01.609817Z 0 [Warning] InnoDB: New log files created, LSN=45790
2016-11-21T12:43:01.649266Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2016-11-21T12:43:01.709477Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 0a0a3a08-afe8-11e6-a5ab-0800276b5788.
2016-11-21T12:43:01.713640Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2016-11-21T12:43:01.714121Z 1 [Note] A temporary password is generated for root@localhost: Rsao9KGih4(,

[root@test102546 mysql-5.7.16-linux-glibc2.5-x86_64]# rm -rf /var/lib/mysql/*
[root@test102546 mysql-5.7.16-linux-glibc2.5-x86_64]# ls -lh /var/lib/mysql/
total 0

[root@test102546 mysql-5.7.16-linux-glibc2.5-x86_64]# bin/mysqld --no-defaults --initialize --user=mysql --datadir=${MYSQL_DATADIR} --basedir=${MYSQL_BASEDIR} --lc-messages-dir=./share/english/
2016-11-21T12:43:38.217029Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2016-11-21T12:43:38.217129Z 0 [Warning] Using pre 5.5 semantics to load error messages from /usr/local/mysql-5.7.16-linux-glibc2.5-x86_64/share/english/.
2016-11-21T12:43:38.217134Z 0 [Warning] If this is not intended, refer to the documentation for valid usage of --lc-messages-dir and --language parameters.
2016-11-21T12:43:38.419627Z 0 [Warning] InnoDB: New log files created, LSN=45790
2016-11-21T12:43:38.461085Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2016-11-21T12:43:38.519524Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 1ffafe84-afe8-11e6-a77b-0800276b5788.
2016-11-21T12:43:38.521334Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2016-11-21T12:43:38.522077Z 1 [Note] A temporary password is generated for root@localhost: k:(c!ArLe3f(
[21 Nov 2016 12:46] Wagner Bianchi
I don't think that warning message is relevant and will take more time to explain that to some one else that doubts about everything. The table was not there but was just created, and if created, is that a Warning?
[21 Nov 2016 12:48] Wagner Bianchi
Just for the records:

-rw-r----- 1 mysql mysql 8.6K Nov 21 12:43 gtid_executed.frm
-rw-r----- 1 mysql mysql  96K Nov 21 12:43 gtid_executed.ibd