Skip to content
标签
欢迎扫码关注公众号

使用 mysqldump 备份 MySQL 数据

新建 backup.bat 文件,内容如下:

bash
set "Ymd=%date:~,4%%date:~5,2%%date:~8,2%%time:~,2%%time:~3,2%%time:~6,2%" 
mysqldump -u username --password=password -h hostname --database databasename > databasename_%Ymd%.sql

执行该 bat 文件即在当前目录下生成数据库的备份文件。

数据量非常大时建议追加 --extended-insert 参数已节省导出导入时间。

注意:使用该参数有利有弊,具体的请参照 extended-insert 对 mysqldump 及导入性能的影响

使用定时任务备份数据库时,如果执行 bat 文件,每次都会弹出命令行窗口,可以新建一个 vbs 文件调用 bat 来隐藏命令行窗口。

vb
Set ws = CreateObject("Wscript.Shell")
ws.run "cmd /c bakcup.bat",vbhide

Page Layout Max Width

Adjust the exact value of the page width of VitePress layout to adapt to different reading needs and screens.

Adjust the maximum width of the page layout
A ranged slider for user to choose and customize their desired width of the maximum width of the page layout can go.

Content Layout Max Width

Adjust the exact value of the document content width of VitePress layout to adapt to different reading needs and screens.

Adjust the maximum width of the content layout
A ranged slider for user to choose and customize their desired width of the maximum width of the content layout can go.