Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [mysqld]
- datadir=/var/lib/mysql
- socket=/var/lib/mysql/mysql.sock
- user=mysql
- # Default to using old password format for compatibility with mysql 3.x
- # clients (those using the mysqlclient10 compatibility package).
- old_passwords=1
- default_character_set = utf8
- collation_server = utf8_general_ci
- character_set_server = utf8
- # The maximum amount of concurrent sessions the MySQL server will
- # allow. One of these connections will be reserved for a user with
- # SUPER privileges to allow the administrator to login even if the
- # connection limit has been reached.
- max_connections = 75
- # The number of open tables for all threads. Increasing this value
- # increases the number of file descriptors that mysqld requires.
- # Therefore you have to make sure to set the amount of open files
- # allowed to at least 4096 in the variable "open-files-limit" in
- # section [mysqld_safe]
- table_cache = 256
- # The maximum size of a query packet the server can handle as well as
- # maximum query size server can process (Important when working with
- # large BLOBs). enlarged dynamically, for each connection.
- max_allowed_packet = 32M
- # Query cache is used to cache SELECT results and later return them
- # without actual executing the same query once again. Having the query
- # cache enabled may result in significant speed improvements, if your
- # have a lot of identical queries and rarely changing tables. See the
- # "Qcache_lowmem_prunes" status variable to check if the current value
- # is high enough for your load.
- # Note: In case your tables change very often or if your queries are
- # textually different every time, the query cache may result in a
- # slowdown instead of a performance improvement.
- query_cache_size = 64M
- # Only cache result sets that are smaller than this limit. This is to
- # protect the query cache of a very large result set overwriting all
- # other query results.
- query_cache_limit = 2M
- # Table type which is used by default when creating new tables, if not
- # specified differently during the CREATE TABLE statement.
- default_table_type = InnoDB
- # Maximum size for internal (in-memory) temporary tables. If a table
- # grows larger than this value, it is automatically converted to disk
- # based table This limitation is for a single table. There can be many
- # of them.
- tmp_table_size = 64M
- # Maximum allowed size for a single HEAP (in memory) table. This option
- # is a protection against the accidential creation of a very large HEAP
- # table which could otherwise use up all memory resources.
- max_heap_table_size = 64M
- # How many threads we should keep in a cache for reuse. When a client
- # disconnects, the client's threads are put in the cache if there aren't
- # more than thread_cache_size threads from before. This greatly reduces
- # the amount of thread creations needed if you have a lot of new
- # connections. (Normally this doesn't give a notable performance
- # improvement if you have a good thread implementation.)
- thread_cache_size = 4
- ### Per-connection configuration ###
- # Sort buffer is used to perform sorts for some ORDER BY and GROUP BY
- # queries. If sorted data does not fit into the sort buffer, a disk
- # based merge sort is used instead - See the "Sort_merge_passes"
- # status variable. Allocated per thread if sort is needed.
- sort_buffer_size = 2M
- # This buffer is used for the optimization of full JOINs (JOINs without
- # indexes). Such JOINs are very bad for performance in most cases
- # anyway, but setting this variable to a large value reduces the
- # performance impact. See the "Select_full_join" status variable for a
- # count of full JOINs. Allocated per thread if full join is found
- join_buffer_size = 2M
- # Thread stack size to use. This amount of memory is always reserved at
- # connection time. MySQL itself usually needs no more than 64K of
- # memory, while if you use your own stack hungry UDF functions or your
- # OS requires more stack for some operations, you might need to set this
- # to a higher value.
- thread_stack = 192K
- ###
- # Log slow queries. Slow queries are queries which take more than the
- # amount of time defined in "long_query_time" or which do not use
- # indexes well, if log_long_format is enabled. It is normally good idea
- # to have this turned on if you frequently add new queries to the
- # system.
- log_slow_queries
- # All queries taking more than this amount of time (in seconds) will be
- # trated as slow. Do not use "1" as a value here, as this will result in
- # even very fast queries being logged from time to time (as MySQL
- # currently measures time with second accuracy only).
- long_query_time = 2
- ###
- # *** INNODB Specific options ***
- # InnoDB, unlike MyISAM, uses a buffer pool to cache both indexes and
- # row data. The bigger you set this the less disk I/O is needed to
- # access data in tables. On a dedicated database server you may set this
- # parameter up to 80% of the machine physical memory size. Do not set it
- # too large, though, because competition of the physical memory may
- # cause paging in the operating system. Note that on 32bit systems you
- # might be limited to 2-3.5G of user level memory per process, so do not
- # set it too high.
- innodb_buffer_pool_size = 256M
- # If set to 1, InnoDB will flush (fsync) the transaction logs to the
- # disk at each commit, which offers full ACID behavior. If you are
- # willing to compromise this safety, and you are running small
- # transactions, you may set this to 0 or 2 to reduce disk I/O to the
- # logs. Value 0 means that the log is only written to the log file and
- # the log file flushed to disk approximately once per second. Value 2
- # means the log is written to the log file at each commit, but the log
- # file is only flushed to disk approximately once per second.
- innodb_flush_log_at_trx_commit = 0
- # The size of the buffer InnoDB uses for buffering log data. As soon as
- # it is full, InnoDB will have to flush it to disk. As it is flushed
- # once per second anyway, it does not make sense to have it very large
- # (even with long transactions).
- innodb_log_buffer_size = 4M
- # Size of each log file in a log group. You should set the combined size
- # of log files to about 25%-100% of your buffer pool size to avoid
- # unneeded buffer pool flush activity on log file overwrite. However,
- # note that a larger logfile size will increase the time needed for the
- # recovery process.
- innodb_log_file_size = 256M
- # The flush method InnoDB will use for Log. The tablespace always uses
- # doublewrite flush logic. The default value is "fdatasync", another
- # option is "O_DSYNC".
- innodb_flush_method=O_DSYNC
- [mysqld_safe]
- log-error=/var/log/mysqld.log
- pid-file=/var/run/mysqld/mysqld.pid
Advertisement
Add Comment
Please, Sign In to add comment