正文开始 <p></p><p>整库备份</p><p>mysql安全dump -h 127.0.0.1 -u root -p *** >erp.sql</p><p>单表备份</p><p><br /></p><p>mysql安全dump -h 127.0.0.1 -u root -p *** cms_info>cms_info.sql</p><br /> <pre>@echo off & setlocal ENABLEEXTENSIONS
set BACKUP_PATH=E:msyql
set DATABASES=51yj
set USERNAME=root
set PASSWORD=851105
set MYSQL=D:xamppmysqlbin
set h=%time:~0,2%
set h=%h: =0%
echo %bak_filename%
set YEAR=%date:~0,4%
set MONTH=%date:~5,2%
set DAY=%date:~8,2%
set HOUR=%time:~0,2%
set MINUTE=%time:~3,2%
set SECOND=%time:~6,2%
set DIR=%BACKUP_PATH%
set ADDON=%YEAR%-%MONTH%-%DAY%
set BACKUP_FILE=%DATABASES%[%ADDON%].sql
echo %BACKUP_FILE%
:: create dir
if not exist %DIR% (
echo %DIR%
mkdir %DIR% 2>nul
)
if not exist %DIR% (
echo Backup path: %DIR% not exists, createdir failed.
goto exit
)
cd /d %DIR%
:: backup
echo Start dump databases...
echo Dumping database %%D ...
%MYSQL%mysqldump.exe -u%USERNAME% -p%PASSWORD% %DATABASES% --ignore-table=51yj.spu_sku_chengpinjing --ignore-table=51yj.spu_sku_fushuchanpin --ignore-table=51yj.spu_sku_huliyongpin --ignore-table=51yj.spu_sku_jingjia --ignore-table=51yj.spu_sku_jingpian_danjiaodian --ignore-table=51yj.spu_sku_jingpian_duojiaodian --ignore-table=51yj.spu_sku_jingpian_lijiaodian --ignore-table=51yj.spu_sku_jingpian_shuangguang --ignore-table=51yj.spu_sku_shilibaojian --ignore-table=51yj.spu_sku_yinxingyanjing --ignore-table=51yj.spu_sku_zheyangjing --ignore-table=51yj.spu_sku_list[old] --ignore-table=51yj.spu_sku_log> %BACKUP_FILE%
echo Done
pause
@:exit</pre>
正文结束 |
Mysql Innodb 引擎优化 参数 | mysql重复索引、冗余索引、未使用索引的定义和查找 |