开发者

MySql and SQL Server backup with code

开发者 https://www.devze.com 2023-01-13 02:59 出处:网络
I try to back up from MySQL with codes. Is it possible? If it开发者_JAVA技巧 will possible, I could use this code getting backup from SQL Server.

I try to back up from MySQL with codes. Is it possible?

If it开发者_JAVA技巧 will possible, I could use this code getting backup from SQL Server.

Thank a lot.


The easiest way is to use the command-line tool mysqldump.

mysqldump -u username -ppassword -h hostname databasename > filename.sql 

It can create dumps from local or remote databases.

It is a part of the mySQL installation package (in the /bin directory)

0

精彩评论

暂无评论...
验证码 换一张
取 消