Mysql can i delete ibdata1




















We should calmly analyze the specific reasons and apply the right medicine to the case. To deal with the database problem in the production environment, the most important problem is to ensure that the data can not be lost, and ensure the normal service of the application on the premise of data integrity.

Therefore, the first and foremost problem is to restore and back up the data. Unfortunately, the database did not do data backup, but fortunately, there is a binlog log file, which can be used for data recovery. I copy the binlog file locally and import it into the new MySQL library locally.

The binary content is stored in the binlog log file, so you need to use the mysqlbinlog command to convert it into a statement that can be executed by mysql, as follows:.

The premise of this method is that your data files. Restart the database successfully, and then log in smoothly. After logging in, it is found that the data is still available and can be accessed normally, so the data backup is carried out quickly. Although the database restart was successful, it's too early to be happy. Because at this time, the database can only query, not add, delete and modify. There are ways to recover from such a situation, but why put yourself in that position?

It's the safe choice. You're going to have to afford it. It's just one outage - schedule it and make it happen. Our resident MySQL expert confirms that this is the only safe way to shrink ibdata1 and I defer to his expertise in these matters.

I would also suggest reading his other posts, linked from that answer, before you schedule the outage window. You may as well clean up as many potential problems as you can since you're going to have to take an outage window If you are running MySQL 5. If you aren't running 5. Importing and Exporting Individual Tables.

Sign up to join this community. The best answers are voted up and rise to the top. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Learn more. Asked 8 years ago. Active 8 years ago. Viewed 18k times. Improve this question. It contains information about errors that occur while the server is running also server start and stop. The General Query Log. This is a general record of what mysqld is doing connect, disconnect, queries.

The Slow Query Log. Finally one thing I would like to mention here is I read this from a blog. It works for me. Database pages are the internal basic structure to organize the data in the database files.

Following, some information about the InnoDB model:. The data files that you define in the configuration file form the InnoDB tablespace. The files are logically concatenated to form the tablespace.

The pages are grouped into extents of size 1MB 64 consecutive pages. By recompiling the code, you can set it to values ranging from 8KB to 64KB.

That is, the maximum row length is about bytes. Asked 6 Months ago Answers: 5 Viewed 36 times.



0コメント

  • 1000 / 1000