Mysql slimming method Note: 1. before performing this operation, stop the Database Service and copy the mqslq5 folder for backup. install the Database Connection Tool navicate on the computer where the database is located; 3. delete useless information. 4. after step 1 is executed, select close connection for your database in navicate. After the execution, start the Database Service and choose to open the connection. in reality, the space that mysql gets smaller is the space that you will release after truncate the tables. Therefore, the actually smaller space depends on the size of your table; www.2cto.com first, remember to stop the mysql software operation steps: 1. First, use the truncate table statement to clear the large data table 2. Back up the database script C: \ Users \ Administrator> mysqldump-umysql-ppassword -- quick -- force -- routines -- add-drop-database Xiesoft -- add-drop-table> d: \ mysqldump_388_2. SQL. After the input, press enter to execute the statement. You need to perform the operation on the computer where the database is located: you can copy the commands in my documents and right-click and paste them in the dos box. This process takes several minutes, if the number of devices in the database and the video table are extremely large, it may take 10 minutes. Please wait! Www.2cto.com 3. stop mysql service; 4. modify my. added after the INI file: innodb_file_per_table. Pay attention to my. ini 5. Delete the ibdate file and log file 6. Start the mysql service. 8. Import the data file C: \ Users \ Administrator> mysql-umysql-ppassword anxiesoft <d: \ mysqldump_388_2. SQL has the same operation method as 2. Copy the command, paste it, and press Enter. This process is relatively slow. The database I backed up is 370 MB, and the import time is less than 5 minutes; please wait patiently at the site according to your actual situation! 9. Check whether the weight loss is successful: 1) check whether the idbata1 In the mysql directory is smaller. Or whether the entire mysql5 folder is small; 2) perform data operations on the platform and check whether the folder is running normally. If a table becomes very large later, you can clear the table and run: truncate table tb_name; then run: OPTIMIZE table tb_name to recycle space.