Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.70 KB | None | 0 0
  1. [client]
  2. #password = your_password
  3. port = 3306
  4. socket = /var/run/mysql/mysql.sock
  5.  
  6. # Here follows entries for some specific programs
  7.  
  8. # The MariaDB server
  9. [mysqld]
  10. port = 3306
  11. socket = /var/run/mysql/mysql.sock
  12. # Change following line if you want to store your database elsewhere
  13. datadir = /var/lib/mysql
  14. skip-external-locking
  15. key_buffer_size = 2G
  16. max_connections=512
  17. max_allowed_packet = 16M
  18. table_open_cache = 512
  19. sort_buffer_size = 4M
  20. net_buffer_length = 8K
  21. read_buffer_size = 4M
  22. read_rnd_buffer_size = 16M
  23. myisam_sort_buffer_size = 128M
  24.  
  25. # Point the following paths to different dedicated disks
  26. #tmpdir = /tmp/
  27.  
  28. # Don't listen on a TCP/IP port at all. This can be a security enhancement,
  29. # if all processes that need to connect to mysqld run on the same host.
  30. # All interaction with mysqld must be made via Unix sockets or named pipes.
  31. # Note that using this option without enabling named pipes on Windows
  32. # (via the "enable-named-pipe" option) will render mysqld useless!
  33. #
  34. #skip-networking
  35.  
  36. # Replication Master Server (default)
  37. # binary logging is required for replication
  38. log-bin=mysql-bin
  39.  
  40. # binary logging format - mixed recommended
  41. binlog_format=mixed
  42.  
  43. # required unique id between 1 and 2^32 - 1
  44. # defaults to 1 if master-host is not set
  45. # but will not function as a master if omitted
  46. server-id = 1
  47.  
  48. # Replication Slave (comment out master section to use this)
  49. #
  50. # To configure this host as a replication slave, you can choose between
  51. # two methods :
  52. #
  53. # 1) Use the CHANGE MASTER TO command (fully described in our manual) -
  54. # the syntax is:
  55. #
  56. # CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
  57. # MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
  58. #
  59. # where you replace <host>, <user>, <password> by quoted strings and
  60. # <port> by the master's port number (3306 by default).
  61. #
  62. # Example:
  63. #
  64. # CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
  65. # MASTER_USER='joe', MASTER_PASSWORD='secret';
  66. #
  67. # OR
  68. #
  69. # 2) Set the variables below. However, in case you choose this method, then
  70. # start replication for the first time (even unsuccessfully, for example
  71. # if you mistyped the password in master-password and the slave fails to
  72. # connect), the slave will create a master.info file, and any later
  73. # change in this file to the variables' values below will be ignored and
  74. # overridden by the content of the master.info file, unless you shutdown
  75. # the slave server, delete master.info and restart the slaver server.
  76. # For that reason, you may want to leave the lines below untouched
  77. # (commented) and instead use CHANGE MASTER TO (see above)
  78. #
  79. # required unique id between 2 and 2^32 - 1
  80. # (and different from the master)
  81. # defaults to 2 if master-host is set
  82. # but will not function as a slave if omitted
  83. #server-id = 2
  84. #
  85. # The replication master for this slave - required
  86. #master-host = <hostname>
  87. #
  88. # The username the slave will use for authentication when connecting
  89. # to the master - required
  90. #master-user = <username>
  91. #
  92. # The password the slave will authenticate with when connecting to
  93. # the master - required
  94. #master-password = <password>
  95. #
  96. # The port the master is listening on.
  97. # optional - defaults to 3306
  98. #master-port = <port>
  99. #
  100. # binary logging - not required for slaves, but recommended
  101. #log-bin=mysql-bin
  102.  
  103. # Uncomment the following if you are using InnoDB tables
  104. #innodb_data_home_dir = /var/lib/mysql
  105. #innodb_data_file_path = ibdata1:10M:autoextend
  106. #innodb_log_group_home_dir = /var/lib/mysql
  107. # You can set .._buffer_pool_size up to 50 - 80 %
  108. # of RAM but beware of setting memory usage too high
  109. #innodb_buffer_pool_size = 16M
  110. #innodb_additional_mem_pool_size = 2M
  111. # Set .._log_file_size to 25 % of buffer pool size
  112. #innodb_log_file_size = 5M
  113. #innodb_log_buffer_size = 8M
  114. #innodb_flush_log_at_trx_commit = 1
  115. #innodb_lock_wait_timeout = 50
  116.  
  117. # The safe_mysqld script
  118. [safe_mysqld]
  119. log-error = /var/log/mysql/mysqld.log
  120. socket = /var/run/mysql/mysql.sock
  121.  
  122. !includedir /etc/mysql
  123.  
  124. [mysqldump]
  125. socket = /var/run/mysql/mysql.sock
  126. quick
  127. max_allowed_packet = 16M
  128.  
  129. [mysql]
  130. no-auto-rehash
  131. # Remove the next comment character if you are not familiar with SQL
  132. #safe-updates
  133.  
  134. [myisamchk]
  135. key_buffer_size = 20M
  136. sort_buffer_size = 20M
  137. read_buffer = 2M
  138. write_buffer = 2M
  139.  
  140. [mysqlhotcopy]
  141. interactive-timeout
  142.  
  143. [mysqld_multi]
  144. mysqld = /usr/bin/mysqld_safe
  145. mysqladmin = /usr/bin/mysqladmin
  146. log = /var/log/mysqld_multi.log
  147. # user = multi_admin
  148. # password = secret
  149.  
  150. # If you want to use mysqld_multi uncomment 1 or more mysqld sections
  151. # below or add your own ones.
  152.  
  153. # WARNING
  154. # --------
  155. # If you uncomment mysqld1 than make absolutely sure, that database mysql,
  156. # configured above, is not started. This may result in corrupted data!
  157. # [mysqld1]
  158. # port = 3306
  159. # datadir = /var/lib/mysql
  160. # pid-file = /var/lib/mysql/mysqld.pid
  161. # socket = /var/lib/mysql/mysql.sock
  162. # user = mysql
  163.  
  164. # [mysqld2]
  165. # port = 3307
  166. # datadir = /var/lib/mysql-databases/mysqld2
  167. # pid-file = /var/lib/mysql-databases/mysqld2/mysql.pid
  168. # socket = /var/lib/mysql-databases/mysqld2/mysql.sock
  169. # user = mysql
  170.  
  171. # [mysqld3]
  172. # port = 3308
  173. # datadir = /var/lib/mysql-databases/mysqld3
  174. # pid-file = /var/lib/mysql-databases/mysqld3/mysql.pid
  175. # socket = /var/lib/mysql-databases/mysqld3/mysql.sock
  176. # user = mysql
  177.  
  178. # [mysqld6]
  179. # port = 3309
  180. # datadir = /var/lib/mysql-databases/mysqld6
  181. # pid-file = /var/lib/mysql-databases/mysqld6/mysql.pid
  182. # socket = /var/lib/mysql-databases/mysqld6/mysql.sock
  183. # user = mysql
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement