In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to migrate the MySQL database in the Linux system. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.
Step 1-perform a MySQL dump
Before transferring the database file to the new VPS, we first need to back it up on the original virtual server using the mysqldump command.
Mysqldump-u root-p-- opt [database name] > [database name] .sql
After performing the dump, you are ready to transfer the database.
Step 2-copy the database
SCP helps you copy the database. If you used the previous command, export the database to the home folder.
The SCP command has the following syntax:
Scp [database name] .sql [username] @ [servername]: path/to/database/
The sample transfer may be as follows:
Scp newdatabase.sql user@example.com:~/
After connecting, the database is transferred to the new virtual private server.
Step 3: import the database
Once the data has been transferred to the new server, you can import the database into MySQL:
Mysql-u root-p newdatabaseWith that, your transfer via SCP will be complete.By Etel Sverdlov
In this way, your transfer through SCP will be completed.
This is the end of the article on "how to migrate MySQL database in Linux system". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it out for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.