Focus on cloud service provider activities
Notes on website operation and maintenance

Three methods for backing up MySQL database

After the website is set up, we must backup it regularly. No matter whether the host company is running away, we also need to backup our website regularly. Especially the VPS user webmaster, because this is different from the host, in case of VPS intrusion, we are basically responsible for it. The security of the website is particularly important.

Generally, after building a website, the website files will not change much, except for some image files. The most important thing is data base Therefore, we should strengthen the frequency of database backup. I suggest backup once a week. There are three methods for backing up the MySQL database.

The first method is to directly phpmyadmin export the backup. We use root management authority to enter phpmyadmin, and then export the MySQL database of the website to be backed up. It is recommended to use gzip compression format.

The second method is to use third-party tools. Some programs have their own backup database function. If not, we can use the Imperial Backup King to send it to the root directory of the website, configure the database for backup, and then download the backup database file to complete the backup.

The third method, The mysqldump command. We log in to SSH, and then use the command to backup.

mysqldump -u root -p laozuo > laozuo.sql

The above command can be backed up as long as it is modified to our own database, and you will be prompted to enter a password after entering it. The mysqldump command will be explained in detail later.

Domain name host preferential information push QQ group: six hundred and twenty-seven million seven hundred and seventy-five thousand four hundred and seventy-seven Get preferential promotion from merchants.
Like( zero )
Do not reprint without permission: Lao Zuo's Notes » Three methods for backing up MySQL database

Scan the code to follow the official account

Get more news about webmaster circle!
Entrepreneurship, operation and new knowledge