473,499 Members | 1,889 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

my.cnf errors..

33 New Member
ok, so ill just say it, im new to mysql.. atleast when it comes to trying to modify it, i've read in places about how to make mysql run more efficiently for different servers, and so i tried to get a new file to use based on the hardware i have, but when i try to resart mysql from Putty, im getting this error..

/etc/init.d/mysql restart
error: Found option without preceding group in config file: /etc/my.cnf at line: 1
Fatal error in defaults handling. Program aborted
Restarting service MySQL
error: Found option without preceding group in config file: /etc/my.cnf at line: 1
Fatal error in defaults handling. Program aborted
Shutting down service MySQL done
error: Found option without preceding group in config file: /etc/my.cnf at line: 1
Fatal error in defaults handling. Program aborted
error: Found option without preceding group in config file: /etc/my.cnf at line: 1
Fatal error in defaults handling. Program aborted
Starting service MySQL done

and i cant really figure out why.. here is my.cnf file

Expand|Select|Wrap|Line Numbers
  1. ################################################################################
  2. #DATE: 2011-02-02
  3. #SITE: http://datastrangler.com
  4. #DESCRIPTION: MySQL config 5.0.x, 5.1.x, 5.5.x 
  5. #RAM: 2GB RAM dedicated server
  6. #Connections: 500 connections
  7. ################################################################################
  8. #[mysqld_safe]
  9. #nice                 = -15
  10. #
  11. #[client]
  12. #socket                 = /var/lib/mysql/mysql.sock
  13. #default-character-set         = utf8
  14. #
  15. [mysqld]
  16. ## Charset and Collation
  17. character-set-server         = utf8
  18. collation-server         = utf8_general_ci
  19.  
  20. ## Files
  21. back_log             = 300
  22. open-files-limit         = 8192
  23. open-files             = 1024    
  24. port                 = 3306
  25. socket                 = /var/lib/mysql/mysql.sock
  26. pid-file             = /var/lib/mysql/mysql.pid
  27. skip-external-locking
  28. skip-name-resolve
  29.  
  30. ## Logging
  31. datadir                = /var/lib/mysql
  32. relay_log            = mysql-relay-bin
  33. relay_log_index            = mysql-relay-index
  34. #log                = mysql-gen.log    
  35. log_error            = mysql-error.err
  36. log_warnings
  37. log_bin                = mysql-bin
  38. log_slow_queries        = mysql-slow.log
  39. #log_queries_not_using_indexes
  40. long_query_time         = 10    #default: 10
  41. max_binlog_size         = 256M    #max size for binlog before rolling
  42. expire_logs_days         = 4    #binlog files older than this will be purged
  43.  
  44. ## Per-Thread Buffers * (max_connections) = total per-thread mem usage
  45. thread_stack             = 256K      #default: 32bit: 192K, 64bit: 256K
  46. sort_buffer_size         = 256K      #default: 2M, larger may cause perf issues
  47. read_buffer_size         = 256K      #default: 128K, change in increments of 4K
  48. read_rnd_buffer_size         = 256K      #default: 256K                
  49. join_buffer_size         = 256K      #default: 128K
  50. binlog_cache_size         = 64K      #default: 32K, size of buffer to hold TX queries
  51. ## total per-thread buffer memory usage: 672000K = 656.25MB
  52.  
  53. ## Query Cache
  54. query_cache_size         = 32M    #global buffer
  55. query_cache_limit         = 512K    #max query result size to put in cache
  56.  
  57. ## Connections
  58. max_connections         = 500    #multiplier for memory usage via per-thread buffers
  59. max_connect_errors         = 100    #default: 10
  60. concurrent_insert        = 2    #default: 1, 2: enable insert for all instances
  61. connect_timeout            = 30    #default -5.1.22: 5, +5.1.22: 10
  62. max_allowed_packet         = 32M    #max size of incoming data to allow
  63.  
  64. ## Default Table Settings
  65. sql_mode             = NO_AUTO_CREATE_USER
  66.  
  67. ## Table and TMP settings
  68. max_heap_table_size         = 128M    #recommend same size as tmp_table_size
  69. bulk_insert_buffer_size     = 128M    #recommend same size as tmp_table_size
  70. tmp_table_size                  = 128M 
  71. #tmpdir                         = /data/mysql-tmp0:/data/mysql-tmp1 #Recommend using RAMDISK for tmpdir
  72.  
  73. ## Table cache settings
  74. #table_cache             = 512    #5.0.x <default: 64>
  75. #table_open_cache        = 512    #5.1.x, 5.5.x <default: 64>
  76.  
  77. ## Thread settings
  78. thread_concurrency        = 4  #recommend 2x CPU cores
  79. thread_cache_size        = 100 #recommend 5% of max_connections
  80.  
  81. ## Replication
  82. #read_only
  83. #skip-slave-start        
  84. #slave-skip-errors        = <default: none, recommend:1062>
  85. #slave-net-timeout        = <default: 3600>
  86. #slave-load-tmpdir        = <location of slave tmpdir>
  87. #slave_transaction_retries    = <default: 10>
  88. #server-id                      = <unique value>
  89. #replicate-same-server-id       = <default: 0, recommend: 0, !if log_slave_updates=1> 
  90. #auto-increment-increment       = <default: none>
  91. #auto-increment-offset          = <default: none>
  92. #master-connect-retry           = <default: 60>
  93. #log-slave-updates        = <default: 0 disable>
  94. #report-host            = <master_server_ip>
  95. #report-user            = <replication_user>
  96. #report-password                = <replication_user_pass>
  97. #report-port            = <default: 3306>
  98. #replicate-do-db                =
  99. #replicate-ignore-db        =
  100. #replicate-do-table        = 
  101. #relicate-ignore-table        =
  102. #replicate-rewrite-db        =
  103. #replicate-wild-do-table    =
  104. #replicate-wild-ignore-table    =
  105.  
  106. ## Replication Semi-Synchronous 5.5.x only, requires dynamic plugin loading ability 
  107. #rpl_semi_sync_master_enabled    = 1 #enable = 1, disable = 0
  108. #rpl_semi_sync_master_timeout    = 1000 #in milliseconds <default: 10000>, master only setting
  109.  
  110. ## 5.1.x and 5.5.x replication related setting. 
  111. #binlog_format            = MIXED
  112.  
  113. ## MyISAM Engine
  114. key_buffer            = 512K    #global buffer
  115. myisam_sort_buffer_size        = 128M    #index buffer size for creating/altering indexes
  116. myisam_max_sort_file_size    = 256M    #max file size for tmp table when creating/alering indexes
  117. myisam_repair_threads        = 4    #thread quantity when running repairs
  118. myisam_recover            = BACKUP    #repair mode, recommend BACKUP 
  119.  
  120. ## InnoDB Plugin Dependent Settings
  121. #ignore-builtin-innodb
  122. #plugin-load=innodb=ha_innodb_plugin.so;innodb_trx=ha_innodb_plugin.so;innodb_locks=ha_innodb_plugin.so;innodb_cmp=ha_innodb_plugin.so;innodb_cmp_reset=ha_innodb_plugin.so;innodb_cmpmem=ha_innodb_plugin.so;innodb_cmpmem_reset=ha_innodb_plugin.so;innodb_lock_waits=ha_innodb_plugin.so
  123.  
  124. ## InnoDB IO Capacity - 5.1.x plugin, 5.5.x
  125. #innodb_io_capacity        = 200
  126.  
  127. ## InnoDB IO settings -  5.1.x only
  128. #innodb_file_io_threads        = 16
  129.  
  130. ## InnoDB IO settings -  5.5.x and greater
  131. #innodb_write_io_threads     = 16
  132. #innodb_read_io_threads        = 16
  133.  
  134. ## InnoDB Plugin Independent Settings
  135. innodb_data_home_dir            = /var/lib/mysql
  136. innodb_data_file_path        = ibdata1:128M;ibdata2:10M:autoextend
  137. innodb_log_file_size        = 64M    #64G_RAM+ = 768, 24G_RAM+ = 512, 8G_RAM+ = 256, 2G_RAM+ = 128 
  138. innodb_log_files_in_group    = 4    #combined size of all logs <4GB. <2G_RAM = 2, >2G_RAM = 4
  139. innodb_buffer_pool_size        = 768M     #global buffer
  140. innodb_additional_mem_pool_size    = 4M    #global buffer
  141. innodb_status_file              #extra reporting
  142. innodb_file_per_table            #enable always
  143. innodb_flush_log_at_trx_commit    = 2    #2/0 = perf, 1 = ACID
  144. innodb_table_locks        = 0    #preserve table locks
  145. innodb_log_buffer_size         = 32M     #global buffer
  146. innodb_lock_wait_timeout     = 60    
  147. innodb_thread_concurrency    = 16    #recommend 2x core quantity
  148. innodb_commit_concurrency    = 16    #recommend 4x num disks
  149. #innodb_flush_method        = O_DIRECT       #O_DIRECT = local/DAS, O_DSYNC = SAN/iSCSI
  150. innodb_support_xa        = 0           #recommend 0, disable xa to negate extra disk flush
  151. skip-innodb-doublewrite
  152.  
  153. ## Binlog sync settings
  154. ## XA transactions = 1, otherwise set to 0 for best performance
  155. sync_binlog            = 0
  156.  
  157. ## TX Isolation
  158. transaction-isolation        = REPEATABLE-READ #REPEATABLE-READ req for ACID, SERIALIZABLE req XA
  159.  
  160. ## Per-Thread Buffer memory utilization equation:
  161. #(read_buffer_size + read_rnd_buffer_size + sort_buffer_size + thread_stack + join_buffer_size + binlog_cache_size) * max_connections
  162.  
  163. ## Global Buffer memory utilization equation:
  164. # innodb_buffer_pool_size + innodb_additional_mem_pool_size + innodb_log_buffer_size + key_buffer_size + query_cache_size
  165.  
  166. [mysqldump]
  167. quick
  168. quote-names
  169. max_allowed_packet         = 128M
  170.  
any ideas would be appreciated... thanks
gt
Jan 9 '12 #1
0 2213

Sign in to post your reply or Sign up for a free account.

Similar topics

11
2241
by: mikey_boy | last post by:
Hello! Curious if anyone could give me a hand. I wrote this PHP script with makes a simple connection to a mysql database called firstdb and just pulls back the results and displays on the...
2
2412
by: Trev | last post by:
SQL Server 2000 BE, Access 2002 FE. I want to write a stored procedure, that will among other things log errors to a table, I want to be able to report a summary of work done and errors to the...
10
2284
by: Douglas Buchanan | last post by:
I am using the following code instead of a very lengthly select case statement. (I have a lot of lookup tables in a settings form that are selected from a ListBox. The data adapters are given a...
0
2105
by: doli | last post by:
Hi, I have the following piece of code which iterates through the potential errors: i =0 For Each error_item in myConn.Errors DTSPackageLog.WriteStringToLog myConn.Errors(i).Description...
4
9821
by: johnb41 | last post by:
I have a form with a bunch of textboxes. Each text box gets validated with the ErrorProvider. I want the form to process something ONLY when all the textboxes are valid. I found a solution,...
2
1562
by: Samuel R. Neff | last post by:
Within the past few weeks we've been getting a lot of compiler errors in two classes when no errors actually exist. The error always reports as Name '_stepResizeRelocator' is not declared. ...
24
5262
by: pat | last post by:
Hi everyone, I've got an exam in c++ in two days and one of the past questions is as follows. Identify 6 syntax and 2 possible runtime errors in this code: class demo {
8
5565
by: ImOk | last post by:
I just have a question about trapping and retrying errors especially file locking or database locks or duplicate key errors. Is there a way after you trap an error to retry the same line that...
0
5040
by: clemrock | last post by:
Help w/ errors.add_to_base between controller and model Hello, I'm having trouble in routing some errors between model and controller. The errors produced in the controller...
2
1965
by: =?Utf-8?B?UmFuZHlz?= | last post by:
This just started when I updated to sp 1 working on a APS.net, Visual Studio 2008, c# Project. When I open a project, I get tons of Errors showing in the list 300+ if I double click on them I go...
0
7012
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7180
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7225
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6901
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5479
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4605
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3105
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3101
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
667
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.