Forum Stats

  • 3,770,163 Users
  • 2,253,079 Discussions
  • 7,875,350 Comments

Discussions

Is it able to remove data\ibdata1 file from mysql 5.6.30 archive install zip

VincentHu-Quest
VincentHu-Quest Member Posts: 4
edited Apr 2, 2020 9:42AM in MySQL Community Space

Hi,

   I would like to know why the file ibdata1 is preset in the "data" folder in mysql server archive version 5.6.30 (windows 64 bit, enterprise version).

   I removed this file , only keep the folder of "mysql" and "performance_schema",  try to start mysqld for the first time, mysqld can still start successfully,   and I see a  new ibdata1 is generated.

   So I have a question, since this file can be generated automatically, why do you need to preset it in data folder?

Tagged:

Best Answer

  • Dave Stokes-MySQL Community Team-Oracle
    Dave Stokes-MySQL Community Team-Oracle MySQL Community Manager TexasMember Posts: 366 Employee
    edited Apr 1, 2020 9:19AM Accepted Answer

    It is the InnoDB table space.

    The system tablespace is the storage area for the InnoDB data dictionary, the double write buffer, the change buffer, and undo logs. It may also contain table and index data if tables are created in the system table space rather than file-per-table or general tablespaces.

    The system tablespace can have one or more data files.

    Dave Stokes

    MySQL Community Manager

Answers

  • Dave Stokes-MySQL Community Team-Oracle
    Dave Stokes-MySQL Community Team-Oracle MySQL Community Manager TexasMember Posts: 366 Employee
    edited Apr 1, 2020 9:19AM Accepted Answer

    It is the InnoDB table space.

    The system tablespace is the storage area for the InnoDB data dictionary, the double write buffer, the change buffer, and undo logs. It may also contain table and index data if tables are created in the system table space rather than file-per-table or general tablespaces.

    The system tablespace can have one or more data files.

    Dave Stokes

    MySQL Community Manager

  • VincentHu-Quest
    VincentHu-Quest Member Posts: 4
    edited Apr 1, 2020 9:06PM

    Hi,

       I mean the newly downloaded archive version, In the case of mysqld starts for the first time, is ibdata1 file still useful? even without it I can start mysqld without any problem and a new one will be generated.

    I just want to know if this file must exists in the nonintall zip archive?  For mysqld , when it starts for the first time, it seems this file is not essential and could be generated, so I think probably this file could be removed from nonintall zip archive.

  • Dave Stokes-MySQL Community Team-Oracle
    Dave Stokes-MySQL Community Team-Oracle MySQL Community Manager TexasMember Posts: 366 Employee
    edited Apr 2, 2020 9:42AM

    Yes, the sever will create the ibdata1 if it does not exist.  I am not sure which zip file you are using but the packager may have put it in there to a) save time, b) preload data (example databases), and/or c) just because it was there when they created the zip file. 

    If it really worries you then delete it.

    Dave Stokes

    MySQL Community Manager