Home > Database > Mysql Tutorial > body text

How to delete ibdata1 in mysql

藏色散人
Release: 2023-02-15 09:43:22
Original
2360 people have browsed it

Mysql method to delete ibdata1: 1. Find the location of "ibdata1"; 2. Execute the "net stop MySQL" command; 3. Delete "ibdata1" through "ib_logfile0 ib_logfile1 ibdata1".

How to delete ibdata1 in mysql

The operating environment of this tutorial: Windows 10 system, mysql5.5 version, Dell G3 computer.

mysql How to delete ibdata1?

Delete ibdata1:

High-risk operation, perform it with caution, because after the operation is completed, the original table of the database may become unusable!

Things to note in database optimization

1. In the database test, if one of the tables has a large amount of data, the insertion efficiency of the other table will be very low

2, ibdata1

When you enable innodb_file_per_table, tables are stored in their own table spaces, but the shared table space still stores other InnoDB internal data:

  • Data dictionary, which is the metadata of the InnoDB table

  • Change buffer

  • Double write buffer

  • Undo log

When we initialize ibdata1, it is best to set it larger. In high concurrency scenarios, ibdata1 will increase sharply and greatly affect performance.

ibdata1

The default location is

C:\ProgramData\MySQL\MySQL Server 5.5\data
Copy after login

Close the database and restart it

net stop MySQL
Copy after login

Delete

ib_logfile0
ib_logfile1
ibdata1
Copy after login

Restart the database

net start MySQL
Copy after login

Currently, no better optimization method has been found

Recommended study: "MySQL Video Tutorial"

The above is the detailed content of How to delete ibdata1 in mysql. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!