MySQL is one of the most popular open-source relational database management system (RDBMS) owned by Oracle Corporation now. In terms of WEB applications, MySQL is the best RDBMS application software. Due to its small size, fast speed and low overall cost of ownership, especially the feature of open source, MySQL is generally chosen as the website database for the development of websites. MySQL is a combination of My (the name of co-founder Michael Widenius’s daughter) and SQL (it’s the abbreviation for Structured Query Language). And it uses the standard SQL data language form. As the most important component of the website, MySQL database should be backed up to a safe place in case of data crushes, corrupted or lost. If you are looking for the best way to backup MySQL to OneDrive, we are going to take you through to backup.
Typically, you may use mysqldump to backup your MySQL database. Mysqldump is a logical backup tool included with both community and enterprise editions of MySQL. It dumps one or more MySQL databases for backup or transfer to another SQL Server.
To access the mysqldump and use MySQL database backup command line, follow these steps:
1. Click Start, input cmd into the dialog box and press enter.
2. Type the command:
mysqldump –e –u[username] –p[password] –h[hostname] [database name] > C:\[filename].sql
For example: mysqldump –utestuser123 –ptestpass –hmy02.winhost.com mysql_27297_testdb > C:\winhostMySqlD.sql
After that, your MySQL database will be backed up.
To restore your MySQL database backup, you could input this command in the step 2 of backup MySQL database:
mysql –u[user name] -p[password] -h[hostname] [database name] < C:\[filename].sql
Mysql –utestuser123 –ppassword123 –hmy02.winhost.com mysql-27297-testdb < C:\winhostMySqlD.sql
In addition, there are three ways to use mysqldump - in order to dump a set of one or more tables, a set of one or more complete databases, or an entire MySQL server, listed as below:
mysqldump [options] db_name [tbl_name ...]
mysqldump [options] --databases db_name ...
mysqldump [options] --all-databases
Except for the general way to backup MySQL automatically, here we are going to introduce you a better free way to backup MySQL to OneDrive. The best free way to backup MySQL to OneDrive is taking advantage of AOMEI Database Backupper, which is the best MySQL database backup tool. You could enter the page https://ebackupper.com/ to sign up for a free AOMEI Database Backupper account. Before you backup MySQL database, you have to log in your AOMEI Database Backupper account, add your MySQL database and OneDrive first to your AOMEI Database Backupper account, and then do MySQL database backup and restore.
In order to add MySQL database, you can refer to the tutorial:
1. Click Management and Sources at the top of page.
2. Choose DB Source, and press +Add DB Source button.
3. Select MySQL to add and enter MySQL database authorization information and click OK.
MySQL database have added successfully now, you can go the below steps.
1. Click the Management -> Sources at the top of main window.
2. Press + Add Cloud Drive button.
3. Choose OneDrive to save your MySQL database backup copy, and click Next.
4. After entering Display Name, click Add OneDrive Account.
The OneDrive will be added successfully now.
After adding MySQL database and OneDrive, you can backup MySQL database automatically now, here are the steps:
1. Click Database Backup at the top of page.
2. Then press + button to add the databases you want to backup. Then hit OK.
3. Click Select Cloud Drive to choose your OneDrive as the destination to store your MySQL database.
Tip: you could enable Schedule option to backup MySQL database once/daily/weekly/monthly.
4. Press the button named Start Backup Now or Add Backup Task.
Now, your MySQL database will be backed up automatically to OneDrive at the time you setting. There is something you should be aware of that the more data you backup the longer time will be cost. Except for backup MySQL to OneDrive, AOMEI Database Backupper allows you to restore MySQL database backup copy to identical location or other locations, selective backup and restore, select multiple websites or databases in one task, restore backup copy to original site or another advanced location, allow power-off backup, etc.
One simple click to backup websites as well as databases online data and save them to your private cloud drives. AOMEI Database Backupper currently supports Google Drive, Dropbox and OneDrive and more
One-click restore target website or database from backups saved on cloud. One-click rescue failed website/database from data loss and reduce financial loss as much as possible for you.
Specially restore websites or databases to other locations instead of original one; migrate websites/databases to a new platform to achieve better performance.