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
11
  • 1) Is your data all InnoDB, all MyISAM, or a mixture of both ??? 2) How much RAM in the DevBox WAMP Server ? 3) Can you please post your my.cnf into the question ??? Jul 5, 2013 at 15:49
  • 1) I believe a mixture of both, 2) 8gb of ram, 3) Alright I'll update the main post.
    – Jon
    Jul 6, 2013 at 17:26
  • I added q query for you to run. Jul 8, 2013 at 13:09
  • Please run the first query at this link : dba.stackexchange.com/a/45682/877 and post the results. Jul 8, 2013 at 14:08
  • @RolandoMySQLDBA Updated the main post with the output, thanks.
    – Jon
    Jul 8, 2013 at 14:16

2 Answers 2

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 :) .

1
  • This page says the default is either 128 or 256 depending on version... So 400 is going to use more memory than the default, right? dev.mysql.com/doc/refman/5.1/en/…
    – Jay K
    Jan 31, 2015 at 4:54
2

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

1
  • Your answer is too terse. Could you please explain at least what will be changed by this parameter? Feb 14, 2014 at 22:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .