在Mysql中,InnoDB的数据库磁盘存储是全部存储在data/ibdata1文件中的,数据量大了,该文件会变的越来越大,在my.ini的[mysqld]标签中加上 innodb_file_per_table=1 ,将可以便每个InnoDB表使用独立的存储文件,如

[mysqld]
basedir="D:/mysql-5.5.19-win32/"
datadir="D:/mysql-5.5.19-win32/data"
innodb_file_per_table=1
character_set_server=utf8
default-storage-engine=innodb
port        = 3306
socket        = /tmp/mysql.sock
skip-external-locking
key_buffer_size = 256M
max_allowed_packet = 1M
table_open_cache = 256
sort_buffer_size = 1M
read_buffer_size = 1M
read_rnd_buffer_size = 4M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size= 16M
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 8
 

加上该参数后,需要将之前的数据全部mysqldump出来,然后再重新入库一次

 

相关文章:

  • 2021-09-20
  • 2021-12-01
  • 2021-10-09
  • 2021-11-27
  • 2021-07-24
  • 2022-12-23
  • 2021-04-16
猜你喜欢
  • 2021-06-23
  • 2021-11-27
  • 2021-12-07
  • 2022-12-23
  • 2022-12-23
  • 2021-12-10
  • 2022-01-29
相关资源
相似解决方案