Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8427069
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T04:41:53+00:00 2026-06-10T04:41:53+00:00

How to set memory limit in my.cnf file. I tried with memory_limit = 64M

  • 0

How to set memory limit in my.cnf file. I tried with memory_limit = 64M . But its showing error while restarting MYSQL server. Any one please help…

my.cnf

[mysqld]
datadir=/home/mysql/
tmpdir=/home/mysqltmp
#max_connections = 175 #was 175
max_connections = 80
#max_connect_errors = 350 #was 250
max_connect_errors = 250
safe-show-database
skip-locking
key_buffer = 1024M # was 128M
max_allowed_packet = 6M
myisam_sort_buffer_size = 64M

#old settings, for 900 ish max maxconn
#sort_buffer_size = 32M
#read_buffer_size = 32M
#read_rnd_buffer_size = 32M

sort_buffer_size = 5M
read_buffer_size = 5M
read_rnd_buffer_size = 5M

query_cache_size= 1024M
query_cache_limit= 16M
max_heap_table_size = 128M
tmp_table_size = 128M
thread_concurrency = 16
wait_timeout = 10
innodb_file_per_table
innodb_log_file_size = 10485760
open_files_limit = 8192
low_priority_updates = 1 
#log_slow_queries = /var/log/mysql_slow.log
#log_queries_not_using_indexes = 1
#slow_queries_log_file = /var/log/mysql_slow.log
memory_limit = 64M 
# who set these? these are NOT memory settings, but rather integer settings.
#table_cache = 1024M
#thread_cache_size = 8M

table_cache = 512
thread_cache_size = 8

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash

[isamchk]
key_buffer = 128M
sort_buffer_size = 128M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
key_buffer = 128M
sort_buffer_size = 128M
read_buffer = 2M
write_buffer = 2M
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T04:41:54+00:00Added an answer on June 10, 2026 at 4:41 am

    There is no such variables like memory_limit in MySQL my.cnf file. You can add variables only from MySQL server system variables. Read this How Mysql uses memory

    It depends on RAM size of your MySQL server. You can configure your my.cnf file accordingly based on following basic formula for MySQL memory requirement calculation:

    key_buffer_size + (read_buffer_size + sort_buffer_size) * max_connections = K bytes of memory
    

    you may need to configure these basic parameters.

    Sample variables from my.cnf file:

    #MyISAM
    key_buffer_size = 8G
    sort_buffer_size = 1M
    read_buffer_size = 1M
    read_rnd_buffer_size = 2M
    myisam_sort_buffer_size = 2M
    join_buffer_size = 2M
    
    #Innodb
    innodb_buffer_pool_size = 16G
    innodb_additional_mem_pool_size = 2G
    innodb_log_file_size = 1G
    innodb_log_buffer_size = 8M
    innodb_flush_log_at_trx_commit = 1
    innodb_lock_wait_timeout = 30
    innodb_file_format=barracuda
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know about the option to set the internal memory ini_set(memory_limit,30M); But I wanted
i need to create a function in my application to set its available memory
Can I set rails to use mysql with MEMORY as the DB engine? I
Does anyone know if its possible to set the amount of memory available in
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 40000 bytes)
I am trying to set memory_limit to 512M, but it's locekd to 256M. ini_set('memory_limit','512M');
I am writing a script, where I need to set memory limit to something
Fatal error: Allowed memory size of 31457280 bytes exhausted (tried to allocate 9828 bytes).
In PHP 5.0.4, if you don't configure -enable-memory-limit, the memory_limit directive is ignored. (It's
I have set Private Memory limit of 200mb in IIS 7 for an application

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.