I need to take dump of database, i do these things for dumping usually.
login to phpmyadmin
select database
select sql tab
paste these lines
TRUNCATE watchdog
;
TRUNCATE cache
; and
TRUNCATE cache_admin_menu
;
And click on OK to clean the cache.
需要脚本文件来清除mysql数据库中的缓存
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
2条回答 默认 最新
- doudou20145 2014-04-16 10:48关注
[root@localhost home]# mysql -u root -ppasswd < /root/Downloads/testscript.sql
I had create one file with name testscript.sql
text in the file as follows
/*
* My First MySQL Script - testscript.sql.
* You need to run this script with an authorized user.
*/
USE dbname; -- Set system database 'dbname' as the current database
TRUNCATE `cache`;
TRUNCATE `cache_admin_menu`;
TRUNCATE `cache_block`;
TRUNCATE `cache_bootstrap`;
TRUNCATE `cache_field`;
TRUNCATE `cache_filter`;
TRUNCATE `cache_form`;
TRUNCATE `cache_image`;
TRUNCATE `cache_libraries`;
TRUNCATE `cache_menu`;
TRUNCATE `cache_page`;
TRUNCATE `cache_path`;
TRUNCATE `cache_rules`;
TRUNCATE `cache_token`;
TRUNCATE `cache_update`;
TRUNCATE `cache_views`;
TRUNCATE `watchdog`;本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报
悬赏问题
- ¥15 使用百度地图api 位置函数报错?
- ¥15 metamask如何添加TRON自定义网络
- ¥66 关于川崎机器人调速问题
- ¥15 winFrom界面无法打开
- ¥30 crossover21 ARM64版本安装软件问题
- ¥15 mymetaobjecthandler没有进入
- ¥15 mmo能不能做客户端怪物
- ¥15 osm下载到arcgis出错
- ¥15 Dell g15 每次打开eiq portal后3分钟内自动退出
- ¥200 使用python编写程序,采用socket方式获取网页实时刷新的数据,能定时print()出来就行。