title: InnoDB: Header page consists of zero bytes in datafile: ./ibdata1
body: <p>I am deploying MySQL on openshift (kubernetes) but getting below error</p>
  
  <pre><code>---&gt; 10:01:34     Initializing database ...
  ---&gt; 10:01:34     Running /opt/rh/rh-mysql57/root/usr/libexec/mysqld --initialize --datadir=/var/lib/mysql/data --ignore-db-dir=lost+found
  ---&gt; 10:01:35     Starting MySQL server with disabled networking ...
  ---&gt; 10:01:35     Waiting for MySQL to start ...
  2019-10-18T10:01:35.188509Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
  2019-10-18T10:01:35.188567Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set.
  2019-10-18T10:01:35.325995Z 0 [Note] /opt/rh/rh-mysql57/root/usr/libexec/mysqld (mysqld 5.7.24) starting as process 40 ...
  2019-10-18T10:01:35.430574Z 0 [Note] InnoDB: PUNCH HOLE support available
  2019-10-18T10:01:35.430612Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
  2019-10-18T10:01:35.430621Z 0 [Note] InnoDB: Uses event mutexes
  2019-10-18T10:01:35.430627Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
  2019-10-18T10:01:35.430634Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.7
  2019-10-18T10:01:35.430642Z 0 [Note] InnoDB: Using Linux native AIO
  2019-10-18T10:01:35.431024Z 0 [Note] InnoDB: Number of pools: 1
  2019-10-18T10:01:35.431174Z 0 [Note] InnoDB: Using CPU crc32 instructions
  2019-10-18T10:01:35.433296Z 0 [Note] InnoDB: Initializing buffer pool, total size = 2G, instances = 8, chunk size = 128M
  2019-10-18T10:01:35.584269Z 0 [Note] InnoDB: Completed initialization of buffer pool
  2019-10-18T10:01:35.610249Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
  2019-10-18T10:01:35.624480Z 0 [ERROR] InnoDB: Header page consists of zero bytes in datafile: ./ibdata1, Space ID:0, Flags: 0. Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting-datadict.html  for how to resolve the issue.
  2019-10-18T10:01:35.624518Z 0 [ERROR] InnoDB: Corrupted page [page id: space=0, page number=0] of datafile './ibdata1' could not be found in the doublewrite buffer.
  2019-10-18T10:01:35.624667Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Data structure corruption
  ---&gt; 10:01:36     Waiting for MySQL to start ...
  2019-10-18T10:01:36.225356Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
  2019-10-18T10:01:36.225372Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
  2019-10-18T10:01:36.225377Z 0 [ERROR] Failed to initialize builtin plugins.
  2019-10-18T10:01:36.225380Z 0 [ERROR] Aborting
  2019-10-18T10:01:36.225393Z 0 [Note] Binlog end
  2019-10-18T10:01:36.225454Z 0 [Note] Shutting down plugin 'CSV'
  2019-10-18T10:01:36.233760Z 0 [Note] /opt/rh/rh-mysql57/root/usr/libexec/mysqld: Shutdown complete
  </code></pre>
  
  <p>I searched on google and they recommend to do following</p>
  
  <pre><code>rm -rf /var/lib/mysql/ib_logfile*
  </code></pre>
  
  <p>but as you know in docker and kubernetes world as soon as pod is not able to come up we cant login to pod and delete these files. Due to this error MySQL pod is not coming up.</p>
  
  <p>I am using glusterfs and i deleted PVC and recreated but still same error.</p>
  
  <p><strong>Update1:</strong>
  After recommendation of @Crou i did following changes</p>
  
  <ul>
  <li>I downloaded new "centos/mysql-57-centos7:5.7" image and retry still same issue</li>
  <li><p>I used mysql:5.7 image and now its throwing following error</p></li>
  <li><p>I deleted PVC and recreated with different size but still same error.</p></li>
  </ul>
  
  <p><code>[ERROR] --initialize specified but the data directory has files in it. Aborting.
   [ERROR] Aborting</code></p>