search
HomeTopicsPagoda PanelWhat should I do if the disk occupied by the Pagoda Panel database is too large?

This article is provided by the tutorial column of Pagoda Panel to introduce to you how to solve the problem of the Pagoda database taking up too much disk space. I hope it will be helpful to you if you need it!

Today I checked that the server disk was almost full, so I looked for the reason. Two reasons were found;

1. There are many and large mysql-bin.000001 files;

mysql> reset master;

Run the above command to clear the log;

2. The MySQL directory ibdata1 file is too large;

1. Back up the data in the database.

mysqldump -u root -p --extended-insert --all-databases --add-drop-database --disable-keys --flush-privileges --quick --routines --triggers > /home/all-database.sql
//有的文档用的是这样的参数:
mysqldump -q -uroot -p --add-drop-table --all-databases --events >/home/all-database.sql

If ibdata1 is hundreds of GB, the backup process may take several hours.

2. Stop the MySQL service.

service mysql stop

3. Delete ibdata1, ib_logfile* and other files

mv ibdata1 ibdata1.20160419
mv ib_logfile0 ib_logfile0.20160420
mv ib_logfile1 ib_logfile1.20160420

4. Modify the my.cnf configuration file

vi /etc/mysql/my.cnf

In [mysqld ] Add the following configuration under the subkey:

innodb_file_per_table = 1

6. Restart the MySQL service

service mysql start
ps -ef|grep mysql

7. Restore data (re-import data)

mysql -u root -p
Enter password:
source /home/all-databaes.sql

The above is the detailed content of What should I do if the disk occupied by the Pagoda Panel database is too large?. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:segmentfault. If there is any infringement, please contact admin@php.cn delete

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Tools

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function