6

I updated my dev-box's WAMPSERVER, and along with updating PHP and Apache, MySQL updated to '5.6.12'. After doing that, I copied the data folder from my old (5.1.36) install to the new one and now MySQL takes up 580mB which is way too much, since I'm the only person using it (Locally) and there are only 20 or so databases on it, none of which have 'memory' tables.

How can I get this down to a decent amount?

My my.ini:

# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html
# *** DO NOT EDIT THIS FILE. It's a template which will be copied to the
# *** default location during install, and will be replaced if you
# *** upgrade to a newer version of MySQL.

[mysqld]

# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M

# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin

# These are commonly set, remove the # and set as required.
# basedir = .....
# datadir = .....
# port = .....
# server_id = .....


# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M 

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES 

Database info:

Storage Engine  Data Size   Index Size  Total Size  
InnoDB           48.00 KB             0.00  B            48.00 KB
MEMORY            0.00  B             0.00  B             0.00  B
MyISAM          163.64 MB           122.49 MB           286.13 MB
Total           163.69 MB           122.49 MB           286.18 MB
Jon
  • 241

2 Answers2

5

i will just expand the "Kolerts" answer: first of all check the version of mysql you are running, right mouse click on wamp icon on system tray, hover over the mysql >> then on version menu, you will find the selected version of it, Follow the path similar to wamp/bin/mysql/mysql5.6.xx (the selected version) and edit my.ini file.

find the tag [mysqld] (normally at the end of file ) and paste the following:

table_definition_cache = 400

Usually with default package this attribute is not set. and mysql uses a default value which is 2000, that's the reason why your resources are totally consumed by it. And if it is there but with high value, then just reduce it to 400. this value is fine for a single or two users, for light purposes but for heavy data etc, you need to adjust them properly.

Save the file and restart mysql service or may be all services to follow new changes.

now open your Task Manager and find mysqld process for a smile on your face :) .

MTM
  • 151
2

You can set "table_definition_cache = 400" in my.ini and restart mysqld

Kolerts
  • 21