---收缩数据库日志文件 USE [master]ALTER DATABASE yourdatabasename SET RECOVERY SIMPLE WITH NO_WAITALTER DATABASE yourdatabasename SET RECOVERY SIMPLE USE yourdatabasename DBCC SHRINKFILE (N'yourdatabasename _Log' , 0,TRUNCATEONLY) --数据库日志文件名(数据库右键-属性-日志逻辑文件名)
自动更新修改时间: mysql> create table z(a int ,b timestamp on update current_timestamp); mysql> insert into z ,current_timestamp; mysql> select * from z; +------+---------------------+ | a | b | +------+---------------------+ | | -- :: | +------+--------
查看数据库表基本信息. select * from information_schema.TABLES where information_schema.TABLES.TABLE_SCHEMA = '数据库名' and information_schema.TABLES.TABLE_NAME = '表名'; 查看mysql数据库大小 SELECT sum(DATA_LENGTH)+sum(INDEX_LENGTH) FROM information_schema.TABLES where TAB