- 
	
	
		
		
			
				
				
				
					 یک کانفیگ  کلی برای  my.cnf  لطفا بدید ؟× یک کانفیگ  کلی برای  my.cnf  لطفا بدید ؟×
					
						
							سلام دوستان 
 
 من کانفیگ my.cnf   رو به اشتباه پاک کردم الان در به در دنبال یک کانفیگ مناسب برای سرور لینوکسی با کنترل پانل centos / whm / cpanel  هستم یه چند تا هم پیدا کردم از این کانفیگ های کلی اما کار ساز نبود و  خطا میداد
 
 میشه یکی لطف کنه و کانفیگ خود سرورش رو بزاره ؟ یه کانفیگ کلی که به همه چیز پرداخته باشه مثل این
 
	
		
			
			
				[mysqld] 
user=mysql 
bind-address=127.0.0.1 
datadir=/var/lib/mysql 
pid-file=/var/run/mysqld/mysqld.pid 
socket=/var/run/mysql/mysql.sock 
port=3306 
tmpdir=/tmp 
language=/usr/share/mysql/english 
skip-external-locking 
query_cache_limit=64M 
query_cache_size=32M 
query_cache_type=1 
max_connections=15 
max_user_connections=300 
interactive_timeout=100 
wait_timeout=100 
connect_timeout=10 
thread_stack=128K 
thread_cache_size=128 
myisam-recover=BACKUP 
key_buffer=64M 
join_buffer=1M 
max_allowed_packet=32M 
table_cache=512M 
sort_buffer_size=1M 
read_buffer_size=1M 
read_rnd_buffer_size=768K 
max_connect_errors=10 
thread_concurrency=4 
myisam_sort_buffer_size=32M 
skip-locking 
skip-bdb 
expire_logs_days=10 
max_binlog_size=100M 
server-id=1 
[mysql.server] 
user=mysql 
basedir=/usr 
[safe_mysqld] 
bind-address=127.0.0.1 
err-log=/var/log/mysqld.log 
pid-file=/var/run/mysqld/mysqld.pid 
open_files_limit=8192 
SAFE_MYSQLD_OPTIONS=”–defaults-file=/etc/my.cnf –log-slow-queries=/var/log/slow-queries.log” 
[mysql] 
[isamchk] 
key_buffer=64M 
sort_buffer=64M 
read_buffer=16M 
write_buffer=16M 
[myisamchk] 
key_buffer=64M 
sort_buffer=64M 
read_buffer=16M 
write_buffer=16M 
[mysqlhotcopy] 
interactive-timeout 
max_heap_table_size = 64 M 
tmp_table_size = 64 M
			
		 
 
 
 من خودم اینو صلاح میدونم اما مشکل داره وقتی اجراش میکنم SQL  رو ریستارت میدم خطا میده  اینم کدش
 
	کد: [mysqld]
socket=/path/to/mysql.sock
datadir=/var/lib/mysql
skip-locking
skip-innodb
# MySQL 4.x has query caching available.
# Enable it for vast improvement and it may be all you need to tweak.
query_cache_type=1
query_cache_limit=1M
query_cache_size=32M
# max_connections=500
# Reduced to 200 as memory will not be enough for 500 connections.
# memory=key_buffer+(sort_buffer_size+read_buffer_size)*max_connections
# which is now: 64 + (1 + 1) * 200 = 464 MB
# max_connections = approx. MaxClients setting in httpd.conf file
# Default set to 100.
#max_connections=200
#interactive_timeout=180
interactive_timeout=100
#wait_timeout=180
#wait_timeout=100
# Reduced wait_timeout to prevent idle clients holding connections.
#wait_timeout=30
wait_timeout=15
connect_timeout=10
# max_connect_errors is set to 10 by default
#max_connect_errors=10
#table_cache=256
#table_cache=1024
# Checked opened tables and adjusted accordingly after running for a while.
table_cache=512
#tmp_table_size=32M by default
#thread_cache=128
# Reduced it to 32 to prevent memory hogging. Also, see notes below.
thread_cache=32
# key_buffer=258M
# Reduced it by checking current size of *.MYI files, see notes below.
key_buffer=128M
# Commented out the buffer sizes and keeping the default.
# sort_buffer_size=2M by default.
#sort_buffer_size=1M
# read_buffer_size=128K by default.
#read_buffer_size=1M
# 1Mb of read_rnd_buffer_size for 1GB RAM -- see notes below.
# read_rnd_buffer_size=256K by default.
#read_rnd_buffer_size=1M
# myisam_sort_buffer_size used for ALTER, OPTIMIZE, REPAIR TABLE commands.
# myisam_sort_buffer_size=8M by default.
#myisam_sort_buffer_size=64M
# thread_concurrency = 2 * (no. of CPU)
thread_concurrency=2
# log slow queries is a must. Many queries that take more than 2 seconds. 
# If so, then your tables need enhancement.
log_slow_queries=/var/log/mysqld.slow.log
long_query_time=2
[mysql.server]
user=mysql
basedir=/var/lib
[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
open_files_limit=8192
[mysqldump]
quick
max_allowed_packet=16M
[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates
[isamchk]
key_buffer=64M
sort_buffer=64M
read_buffer=16M
write_buffer=16M
[myisamchk]
key_buffer=64M
sort_buffer=64M
read_buffer=16M
write_buffer=16M
[mysqlhotcopy]
interactive-timeout 
[client]
socket=/path/to/mysql.sock 
 
 
 
 
 
 
 
 
- 
    
- 
		
			
						
						
							May 28th, 2011 00:20
						
					
					
						
							 # ADS
						
					
			 
 
- 
	
	
		
			
			
				عضو دائم
			
			
			
			
			
			
				  
 
 
			
				
				
				
					 پاسخ : یک کانفیگ  کلی برای  my.cnf  لطفا بدید ؟× پاسخ : یک کانفیگ  کلی برای  my.cnf  لطفا بدید ؟×
					
						
							بسته به تعداد هسته ای س پی یو و میزان رم تنظیمات متغیر هستش
 احتمالا در جایی از این تنظیمات اشتباه تایپی وجود داره که سخته پیدا کردنش
 
 
 
 
 
 
 
- 
    
- 
	
	
		
			
			
				عضو انجمن
			
			
			
			
			
			
				  
 
 
			
				
				
				
					 پاسخ : یک کانفیگ  کلی برای  my.cnf  لطفا بدید ؟× پاسخ : یک کانفیگ  کلی برای  my.cnf  لطفا بدید ؟×
 
 
 
 
- 
    
    
    
    
    
        
            تعداد تشکر ها ازpersian.developer به دلیل پست مفید