The following article mainly explains how to handle the problem after the MySQL database in the email server is damaged. We all know that a sudden power failure may damage the MySQL database of the email server. Next we will explain it step by step.
The first step of restoring MySQL database corruption on the email server:
Stop the MuseIM Server, MuseMail Server, and MuseSQL services.
Step 2 of restoring MySQL database corruption on the email server:
In the installation directory of the email server, open the MySQL folder and find my. ini, set my. in ini, change port = 3308 to 3306 and start the MySQL service so that MySQL can be operated through the command line.
Step 3 of restoring MySQL database corruption on the email server:
Test whether the MySQL database can be accessed through the command line.
Method: Start-> Run-> Enter CMD
Go to the Mail Server installation directory MySQL/bin.
Enter MySQL-u root-p and press Enter.
Prompt for password:
Enter the password and press Enter. If you can access the mysq system normally, it means no problem, you can proceed to the next step.
Step 4 of restoring MySQL database corruption on the email server:
Use the MySQLdump command to export data
The command is as follows:
- MySQLdump -u root -pmUsEmAiL3005 --opt MuseMail >D:\an.sql
If an error occurs during data export, the system will prompt the number of rows in the table that encountered an error. Then, use the Navicat for MySQL tool to delete the row,
Continue with the import command until all data can be exported normally.
The MySQL database in the mail server is damaged and restored at last:
Change the Port Back To 3308 and restart MuseSQL in the email server and Muse service.
Attached to the MySQL database deletion command:
- delete from tbl_imlogs where id < 35000;
The above content is an introduction to how to deal with the MySQL database corruption on the mail server. I hope you will have some gains.