The time now is AM. Twitter: linuxquestions. Open Source Consulting Domain Registration. Search Blogs. Mark Forums Read. User Name. Remember Me? Linux - Software This forum is for Software issues. Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. View Public Profile. View Review Entries. Find More Posts by Kunsheng. Then dump all your MySQL databases to a single file using the mysqldump command.
Once the dump is completed, you are ready to transfer the databases. MySQL doesn't store data as. Step 2 — Check which tables are corrupted and make a list. Step 3 — Backup and drop your corrupted tables.
Step 5 — Import backup. Step 6 — Change port and grab a beer. This is required in order to add to the data folders. Copy database folder into new MySQLdata folder. Probably best to restore to a test environment first. Copy all InnoDB data files ibdata files and. Copy all the. Copy your my. To restore the data from the above files , first stop the MySQL server. Copy the ibdata files , and the database schema folder to some other directory.
However, to setup your server to use separate files for each table you need to change my. Now you're fit to go. However, ibdata1 will not shrink unless you do the steps above. It is in fact just a bunch of read-only views, not tables. And there are no files associated with the them, not even a database directory.
I'm sure a google search or the MySQL site will bring up numerous other differences in more detail. Here is a simple way to enable them. In mysql we need to see often 3 logs which are mostly needed during any project development. The Error Log. It contains information about errors that occur while the server is running also server start and stop. The General Query Log. The detailed execution script is as follows:. In order to reduce the trouble, I chose the second one.
The execution script is as follows:. In this way, the root user can log in to mysql normally, create a new database after logging in, and then pour in the previously backed up data, and everything will be OK. Fatal Error s Home Blogs Post a blog. Data recovery method 1-binlog log 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.
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 Sign in mysql -uroot -p Data backup.
Recover database When the data is restored, you will have confidence in your heart.
0コメント