0

Well i've set myself to learn php and mysql, bought a book installed XAMPP inside a virtual machine. However i was thinking mysql wouldnt use that much memory, but it uses 500Mb. And i have not even created anything in it, i'm not sure if thats normal. I had choosen the Xampp light setup, since my only interest here is Php and mysql.

My goal is just to create a few simple databases with a web interface. And i'm at the first steps of learning php I'm not new to programming, i know a long list of computer languages However i am new to mysql and php appache.

Can someone tell me what to do to reduce memory of mysql ?. As currently i run into problems, the host running the virtual machine is not that heavy

Peter
  • 2,043
  • 1
  • 21
  • 45
  • you could start by read the mysql docs and looking up the config options for setting memory limits... – Marc B Aug 12 '14 at 19:37

3 Answers3

1

I think this is a bug in the (windows) installer of MySQL which could be also used in xampp.

http://bugs.mysql.com/bug.php?id=68287

Try looking for table_definition_cache in my.cnf and lower this to ~ 200

Daniel W.
  • 31,164
  • 13
  • 93
  • 151
0

If you're not storing anything in it as you said, then the 500MB isn't for the 'MYSQL' process but it's for the whole XAMPP thing.

Long story short, this is the Mysql configuration file path :

/etc/mysql/my.cnf

in this file you can find :

key_buffer              = 8M
max_connections         = 30
query_cache_size        = 8M
query_cache_limit       = 512K
thread_stack            = 128K

This is the MAXIMUM memory the Mysql is using.

Hope this helps.

Redaa
  • 1,540
  • 2
  • 17
  • 28
  • i was thinking mysqld.exe is the process of mysql which consumes 500mb here, but you say the process includes php appache and mysql.. isnt that still a bit large?, or did i had a wrong idea about it. I was thinking those where minimized services no extra's – Peter Aug 12 '14 at 19:48
  • @user219279 i don't think that the mysqld.exe can reach 500mb, i have a plenty of database... and only 10mb is used, mysqld is just the process for running mysql, i thought you were speaking about the whole xampp process – Redaa Aug 12 '14 at 20:02
  • no its just mysqld at around 500mb (i see it in taskmanager) / resource monitor memory usage. something must be wrong here, but i dont know what – Peter Aug 12 '14 at 20:34
  • i ffound this [link](http://stackoverflow.com/questions/1178736/mysql-maximum-memory-usage) – Redaa Aug 12 '14 at 20:57
0
mysql in xampp 400mb cpu

You add in php.ini two line end :

[mysqld]

table_definition_cache = 400

I sure with you :) .

aberna
  • 5,594
  • 2
  • 28
  • 33
huvo
  • 1
  • since it is an answer to an old question could you please add more details ? What is the innovation factor of your answer comparing to the old one already accepted ? – aberna Feb 25 '15 at 14:38