Mysqldump how to remotely back up mysql database mysqldump
BitsCN.com
The user who uses mysqldump to back up the database requires a relatively small amount of permissions. only the select and lock table permissions are required. Therefore, users who can create a backup database can back up the database to avoid accidental damage to the database. Before backing up the database, we have to make full preparations. First, we created the database user -- backup, and the password is 123456. Next, determine which database we want to back up and where to store it. Then, determine where the backup files of the database are to be stored. Assume that our task is to back up a database named backup_test on the 192.168.1.2 server and put the backup file in the D:/bak/folder. Assuming that the operating system is windows xp, we can use the following methods to perform backup operations: we can use the command prompt that comes with windows (there are many methods to call Command Prompt, the most common one is to click the Start menu, select "run", and enter the cmd command to start), and enter the following command in the command prompt: 1 mysqldump-ubackup-p123456-h 192.168.1.2 backup_test> D:/bak/bakcup. SQL in this command: mysqldump is the program name of myqldump;-u is the database user name, followed by the user name backup;-p is the database password, followed by the password, note that there must be no space between-p and password.-h indicates the database address. If this parameter is not set, the local database is backed up. backup_test indicates the name of the database to be backed up.> it indicates that the database is backed up to the following file, which is followed by the address of the backup file. Be sure to use the absolute file path, The suffix of the file can also be .txt. Once this command is executed, mysqldump immediately performs the backup operation. Remote backup of the database seems to be a network situation. generally, remote backup takes some time. If you write this command to process files in batches, you can regularly back up data through scheduled tasks in windows. In windows, mysqldump is used to back up the database. because there is no gzip compression engine, you cannot compress the backup database. Therefore, if there are too many backup files, you need to regularly clean up expired database backup files.
Author neo600bitsCN.com