diff options
Diffstat (limited to 'support-files')
-rw-r--r-- | support-files/CMakeLists.txt | 9 | ||||
-rwxr-xr-x | support-files/build-tags | 4 | ||||
-rw-r--r-- | support-files/compiler_warnings.supp | 47 | ||||
-rw-r--r-- | support-files/mariadb.service.in | 4 | ||||
-rw-r--r-- | support-files/mariadb@.service.in | 5 | ||||
-rw-r--r-- | support-files/my-huge.cnf.sh | 150 | ||||
-rw-r--r-- | support-files/my-innodb-heavy-4G.cnf.sh | 481 | ||||
-rw-r--r-- | support-files/my-large.cnf.sh | 150 | ||||
-rw-r--r-- | support-files/my-medium.cnf.sh | 148 | ||||
-rw-r--r-- | support-files/my-small.cnf.sh | 88 | ||||
-rw-r--r-- | support-files/mysqld_multi.server.sh | 19 | ||||
-rw-r--r-- | support-files/policy/apparmor/usr.sbin.mysqld | 2 | ||||
-rw-r--r-- | support-files/policy/selinux/mariadb-server.fc | 1 | ||||
-rw-r--r-- | support-files/policy/selinux/mariadb-server.te | 4 | ||||
-rw-r--r-- | support-files/rpm/server.cnf | 4 |
15 files changed, 32 insertions, 1084 deletions
diff --git a/support-files/CMakeLists.txt b/support-files/CMakeLists.txt index 9fb045c0657..749964284c4 100644 --- a/support-files/CMakeLists.txt +++ b/support-files/CMakeLists.txt @@ -41,15 +41,6 @@ ELSE() SET(inst_location ${INSTALL_SUPPORTFILESDIR}) ENDIF() -IF (NOT WITHOUT_SERVER) -FOREACH(inifile my-huge my-innodb-heavy-4G my-large my-medium my-small) - CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${inifile}.cnf.sh - ${CMAKE_CURRENT_BINARY_DIR}/${inifile}.${ini_file_extension} @ONLY) - INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${inifile}.${ini_file_extension} - DESTINATION ${inst_location} COMPONENT IniFiles) -ENDFOREACH() -ENDIF() - IF(WITH_WSREP) CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/wsrep.cnf.sh ${CMAKE_CURRENT_BINARY_DIR}/wsrep.${ini_file_extension} @ONLY) diff --git a/support-files/build-tags b/support-files/build-tags index e94b7bed298..660a7d7f9fc 100755 --- a/support-files/build-tags +++ b/support-files/build-tags @@ -5,8 +5,8 @@ rm -f TAGS if git rev-parse HEAD >/dev/null 2>&1 then cd `git rev-parse --show-toplevel` - echo client storage dbug libmysql sql-common \ - sql extra mysys mysys_ssl strings regex pcre vio include \ + echo sql mysys strings client storage dbug libmysql sql-common \ + extra mysys_ssl strings regex pcre vio include \ tools unittest plugin libmysqld | \ xargs -n1 git ls-files | grep -v '\.jar$' | grep -v '\.xz$' | \ xargs etags -o TAGS --append diff --git a/support-files/compiler_warnings.supp b/support-files/compiler_warnings.supp index 249060108bf..4d9ca1c815b 100644 --- a/support-files/compiler_warnings.supp +++ b/support-files/compiler_warnings.supp @@ -20,46 +20,6 @@ .*/sql_yacc.cc : .*switch statement contains 'default' but no 'case' labels.* # -# Things that can be ignored in InnoDB -# -.*/pars0grm.tab.c: .*'yyerrorlab' : unreferenced label.* -.*/pars0grm.c: 'yyerrorlab' : unreferenced label -.*/_flex_tmp.c: .*not enough actual parameters for macro 'yywrap'.* -.*/lexyy.c : not enough actual parameters for macro 'yywrap' -.*/pars0lex.l: .*conversion from 'ulint' to 'int', possible loss of data.* -.*/include/buf0buf\.ic: unused parameter .*mtr.* -.*/fil/fil0fil\.c: pointer targets in passing argument.*differ in signedness -.*/fil/fil0fil\.c: comparison between signed and unsigned : 3100-3199 -.*/fil/fil0fil\.c: unused parameter -.*/log/log0recv\.c: unused variable -.*/os/os0file\.c: unused parameter -.*/os/os0file\.c: pointer targets in assignment differ in signedness -.*/handler/i_s\.cc: unused variable -.*/sync/sync0rw\.c: unused parameter -.*/sync/sync0sync\.c: unused parameter -.*/sync/sync0sync\.c: unused variable -.*/ut/ut0ut\.c: ignoring return value of -.*/srv/srv0srv\.c: value computed is not used -.*/buf/buf0buf\.c: .*block_mutex.* might be used uninitialized -.*/btr/btr0cur\.c: null argument where non-null required: 1800-3000 -.*/btr/btr0btr\.c: null argument where non-null required -.*/btr/btr0cur\.c: .*value computed is not used.*: 3175-3375 -.*/btr/btr0sea\.c: passing argument 2 .* discards qualifiers from pointer target type -.*/ibuf/ibuf0ibuf.c: null argument where non-null required: 700-1000 -.*/fsp0fsp\.c: result of 32-bit shift implicitly converted to 64 bits -.*/log/log0log\.c : passing arg 1 of `atomic_add_64_nv' from incompatible pointer type -.*/log/log0online\.c : passing arg 1 of `atomic_add_64_nv' from incompatible pointer type -.*/buf/buf0buf\.c : label.*loop2.* defined but not used - -# -# Xtradb engine -# -.*/storage/xtradb/handler/ha_innodb\.cc: ignoring return value of -.*/storage/xtradb/row/row0log\.cc: ignoring return value of -.*/storage/xtradb/btr/btr0cur\.cc : null argument where non-null required -.*/storage/xtradb/btr/btr0scrub\.cc : null argument where non-null required - -# # bdb is not critical to keep up to date # .*/bdb/.* : .*discards qualifiers from pointer target type.* @@ -186,6 +146,8 @@ .*/storage/connect/xindex\.cpp: ignoring return value of .*/storage/connect/value\.cpp: always false : 1000-1020 .*/storage/connect/json\.cpp: might be clobbered by +.*/storage/connect/filemdbf\.cpp: ignoring return value.*fwrite +.*/storage/connect/value\.cpp: .*comparison is always false due to limited range # # mroonga @@ -214,6 +176,11 @@ .*/liblzma/lz/lz_encoder\.c : variable.*in_used.*set but not used # +# pcre +# +.*/pcre/pcre_exec\.c: noclone.*attribute directive ignored + +# # Unexplanable (?) stuff # .*/listener\.cc : .*conversion from 'SOCKET' to 'int'.* diff --git a/support-files/mariadb.service.in b/support-files/mariadb.service.in index e7976a8f3e2..1b1c9a5d592 100644 --- a/support-files/mariadb.service.in +++ b/support-files/mariadb.service.in @@ -86,9 +86,7 @@ ExecStartPre=/bin/sh -c "[ ! -e @bindir@/galera_recovery ] && VAR= || \ # Use the [Service] section and Environment="MYSQLD_OPTS=...". # This isn't a replacement for my.cnf. # _WSREP_NEW_CLUSTER is for the exclusive use of the script galera_new_cluster -# Note: we set --basedir to prevent probes that might trigger SELinux alarms, -# per bug https://bugzilla.redhat.com/show_bug.cgi?id=547485 -ExecStart=@sbindir@/mysqld $MYSQLD_OPTS --basedir=@prefix@ $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION +ExecStart=@sbindir@/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION # Unset _WSREP_START_POSITION environment variable. ExecStartPost=/bin/sh -c "systemctl unset-environment _WSREP_START_POSITION" diff --git a/support-files/mariadb@.service.in b/support-files/mariadb@.service.in index 7a79a143778..185157a510d 100644 --- a/support-files/mariadb@.service.in +++ b/support-files/mariadb@.service.in @@ -103,12 +103,9 @@ ExecStartPre=/bin/sh -c "[ ! -e @bindir@/galera_recovery ] && VAR= || \ # This isn't a replacement for my.cnf. # _WSREP_NEW_CLUSTER is for the exclusive use of the script galera_new_cluster -# Note: we set --basedir to prevent probes that might trigger SELinux alarms, -# per bug https://bugzilla.redhat.com/show_bug.cgi?id=547485 -# # Note: Place $MYSQLD_OPTS at the very end for its options to take precedence. -ExecStart=@sbindir@/mysqld --defaults-file=@sysconf2dir@/my%I.cnf --basedir=@prefix@ \ +ExecStart=@sbindir@/mysqld --defaults-file=@sysconf2dir@/my%I.cnf \ $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION%I $MYSQLD_OPTS # Alternate: (remove ConditionPathExists above) # use [mysqld.INSTANCENAME] as sections in my.cnf diff --git a/support-files/my-huge.cnf.sh b/support-files/my-huge.cnf.sh deleted file mode 100644 index 597e66f2099..00000000000 --- a/support-files/my-huge.cnf.sh +++ /dev/null @@ -1,150 +0,0 @@ -# Example MariaDB config file for very large systems. -# -# This is for a large system with memory of 1G-2G where the system runs mainly -# MariaDB. -# -# MariaDB programs look for option files in a set of -# locations which depend on the deployment platform. -# You can copy this option file to one of those -# locations. For information about these locations, do: -# 'my_print_defaults --help' and see what is printed under -# Default options are read from the following files in the given order: -# More information at: http://dev.mysql.com/doc/mysql/en/option-files.html -# -# In this file, you can use all long options that a program supports. -# If you want to know which options a program supports, run the program -# with the "--help" option. - -# The following options will be passed to all MySQL clients -[client] -#password = your_password -port = @MYSQL_TCP_PORT@ -socket = @MYSQL_UNIX_ADDR@ - -# Here follows entries for some specific programs - -# The MySQL server -[mysqld] -port = @MYSQL_TCP_PORT@ -socket = @MYSQL_UNIX_ADDR@ -skip-external-locking -key_buffer_size = 384M -max_allowed_packet = 1M -table_open_cache = 512 -sort_buffer_size = 2M -read_buffer_size = 2M -read_rnd_buffer_size = 8M -myisam_sort_buffer_size = 64M -thread_cache_size = 8 -query_cache_size = 32M -# Try number of CPU's*2 for thread_concurrency -thread_concurrency = 8 - -# Point the following paths to a dedicated disk -#tmpdir = /tmp/ - -# Don't listen on a TCP/IP port at all. This can be a security enhancement, -# if all processes that need to connect to mysqld run on the same host. -# All interaction with mysqld must be made via Unix sockets or named pipes. -# Note that using this option without enabling named pipes on Windows -# (via the "enable-named-pipe" option) will render mysqld useless! -# -#skip-networking - -# Replication Master Server (default) -# binary logging is required for replication -log-bin=mysql-bin - -# required unique id between 1 and 2^32 - 1 -# defaults to 1 if master-host is not set -# but will not function as a master if omitted -server-id = 1 - -# Replication Slave (comment out master section to use this) -# -# To configure this host as a replication slave, you can choose between -# two methods : -# -# 1) Use the CHANGE MASTER TO command (fully described in our manual) - -# the syntax is: -# -# CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>, -# MASTER_USER=<user>, MASTER_PASSWORD=<password> ; -# -# where you replace <host>, <user>, <password> by quoted strings and -# <port> by the master's port number (3306 by default). -# -# Example: -# -# CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306, -# MASTER_USER='joe', MASTER_PASSWORD='secret'; -# -# OR -# -# 2) Set the variables below. However, in case you choose this method, then -# start replication for the first time (even unsuccessfully, for example -# if you mistyped the password in master-password and the slave fails to -# connect), the slave will create a master.info file, and any later -# change in this file to the variables' values below will be ignored and -# overridden by the content of the master.info file, unless you shutdown -# the slave server, delete master.info and restart the slaver server. -# For that reason, you may want to leave the lines below untouched -# (commented) and instead use CHANGE MASTER TO (see above) -# -# required unique id between 2 and 2^32 - 1 -# (and different from the master) -# defaults to 2 if master-host is set -# but will not function as a slave if omitted -#server-id = 2 -# -# The replication master for this slave - required -#master-host = <hostname> -# -# The username the slave will use for authentication when connecting -# to the master - required -#master-user = <username> -# -# The password the slave will authenticate with when connecting to -# the master - required -#master-password = <password> -# -# The port the master is listening on. -# optional - defaults to 3306 -#master-port = <port> -# -# binary logging - not required for slaves, but recommended -#log-bin=mysql-bin -# -# binary logging format - mixed recommended -#binlog_format=mixed - -# Uncomment the following if you are using InnoDB tables -#innodb_data_home_dir = @localstatedir@ -#innodb_data_file_path = ibdata1:2000M;ibdata2:10M:autoextend -#innodb_log_group_home_dir = @localstatedir@ -# You can set .._buffer_pool_size up to 50 - 80 % -# of RAM but beware of setting memory usage too high -#innodb_buffer_pool_size = 384M -# Set .._log_file_size to 25 % of buffer pool size -#innodb_log_file_size = 100M -#innodb_log_buffer_size = 8M -#innodb_flush_log_at_trx_commit = 1 -#innodb_lock_wait_timeout = 50 - -[mysqldump] -quick -max_allowed_packet = 16M - -[mysql] -no-auto-rehash -# Remove the next comment character if you are not familiar with SQL -#safe-updates - -[myisamchk] -key_buffer_size = 256M -sort_buffer_size = 256M -read_buffer = 2M -write_buffer = 2M - -[mysqlhotcopy] -interactive-timeout diff --git a/support-files/my-innodb-heavy-4G.cnf.sh b/support-files/my-innodb-heavy-4G.cnf.sh deleted file mode 100644 index bf9ec7fa147..00000000000 --- a/support-files/my-innodb-heavy-4G.cnf.sh +++ /dev/null @@ -1,481 +0,0 @@ -#BEGIN CONFIG INFO -#DESCR: 4GB RAM, InnoDB only, ACID, few connections, heavy queries -#TYPE: SYSTEM -#END CONFIG INFO - -# -# This is a MariaDB example config file for systems with 4GB of memory -# running mostly MariaDB using InnoDB only tables and performing complex -# queries with few connections. -# -# MariaDB programs look for option files in a set of -# locations which depend on the deployment platform. -# You can copy this option file to one of those -# locations. For information about these locations, do: -# 'my_print_defaults --help' and see what is printed under -# Default options are read from the following files in the given order: -# More information at: http://dev.mysql.com/doc/mysql/en/option-files.html -# -# In this file, you can use all long options that a program supports. -# If you want to know which options a program supports, run the program -# with the "--help" option. -# -# More detailed information about the individual options can also be -# found in the manual. -# - -# -# The following options will be read by MariaDB client applications. -# Note that only client applications shipped by MariaDB are guaranteed -# to read this section. If you want your own MariaDB client program to -# honor these values, you need to specify it as an option during the -# MariaDB client library initialization. -# -[client] -#password = [your_password] -port = @MYSQL_TCP_PORT@ -socket = @MYSQL_UNIX_ADDR@ - -# *** Application-specific options follow here *** - -# -# The MariaDB server -# -[mysqld] - -# generic configuration options -port = @MYSQL_TCP_PORT@ -socket = @MYSQL_UNIX_ADDR@ - -# back_log is the number of connections the operating system can keep in -# the listen queue, before the MariaDB connection manager thread has -# processed them. If you have a very high connection rate and experience -# "connection refused" errors, you might need to increase this value. -# Check your OS documentation for the maximum value of this parameter. -# Attempting to set back_log higher than your operating system limit -# will have no effect. -back_log = 50 - -# Don't listen on a TCP/IP port at all. This can be a security -# enhancement, if all processes that need to connect to mysqld run -# on the same host. All interaction with mysqld must be made via Unix -# sockets or named pipes. -# Note that using this option without enabling named pipes on Windows -# (via the "enable-named-pipe" option) will render mysqld useless! -#skip-networking - -# The maximum amount of concurrent sessions the MariaDB 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 = 100 - -# Maximum amount of errors allowed per host. If this limit is reached, -# the host will be blocked from connecting to the MariaDB server until -# "FLUSH HOSTS" has been run or the server was restarted. Invalid -# passwords and other errors during the connect phase result in -# increasing this value. See the "Aborted_connects" status variable for -# global counter. -max_connect_errors = 10 - -# 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_open_cache = 2048 - -# Enable external file level locking. Enabled file locking will have a -# negative impact on performance, so only use it in case you have -# multiple database instances running on the same files (note some -# restrictions still apply!) or if you use other software relying on -# locking MyISAM tables on file level. -#external-locking - -# 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 = 16M - -# The size of the cache to hold the SQL statements for the binary log -# during a transaction. If you often use big, multi-statement -# transactions you can increase this value to get more performance. All -# statements from transactions are buffered in the binary log cache and -# are being written to the binary log at once after the COMMIT. If the -# transaction is larger than this value, temporary file on disk is used -# instead. This buffer is allocated per connection on first update -# statement in transaction -binlog_cache_size = 1M - -# 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 - -# Size of the buffer used for doing full table scans. -# Allocated per thread, if a full scan is needed. -read_buffer_size = 2M - -# When reading rows in sorted order after a sort, the rows are read -# through this buffer to avoid disk seeks. You can improve ORDER BY -# performance a lot, if set this to a high value. -# Allocated per thread, when needed. -read_rnd_buffer_size = 16M - -# 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 = 8M - -# 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 = 8M - -# 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 = 8 - -# This permits the application to give the threads system a hint for the -# desired number of threads that should be run at the same time. This -# value only makes sense on systems that support the thread_concurrency() -# function call (Sun Solaris, for example). -# You should try [number of CPUs]*(2..4) for thread_concurrency -thread_concurrency = 8 - -# 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 - -# Minimum word length to be indexed by the full text search index. -# You might wish to decrease it if you need to search for shorter words. -# Note that you need to rebuild your FULLTEXT index, after you have -# modified this value. -ft_min_word_len = 4 - -# If your system supports the memlock() function call, you might want to -# enable this option while running MariaDB to keep it locked in memory and -# to avoid potential swapping out in case of high memory pressure. Good -# for performance. -#memlock - -# Table type which is used by default when creating new tables, if not -# specified differently during the CREATE TABLE statement. -default-storage-engine = MYISAM - -# Thread stack size to use. This amount of memory is always reserved at -# connection time. MariaDB 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 = 240K - -# Set the default transaction isolation level. Levels available are: -# READ-UNCOMMITTED, READ-COMMITTED, REPEATABLE-READ, SERIALIZABLE -transaction_isolation = REPEATABLE-READ - -# 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 - -# Enable binary logging. This is required for acting as a MASTER in a -# replication configuration. You also need the binary log if you need -# the ability to do point in time recovery from your latest backup. -log-bin=mysql-bin - -# binary logging format - mixed recommended -binlog_format=mixed - -# If you're using replication with chained slaves (A->B->C), you need to -# enable this option on server B. It enables logging of updates done by -# the slave thread into the slave's binary log. -#log_slave_updates - -# Enable the full query log. Every query (even ones with incorrect -# syntax) that the server receives will be logged. This is useful for -# debugging, it is usually disabled in production use. -#log - -# Print warnings to the error log file. If you have any problem with -# MariaDB you should enable logging of warnings and examine the error log -# for possible explanations. -#log_warnings - -# 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_short_format is not enabled. It is normally good idea -# to have this turned on if you frequently add new queries to the -# system. -slow_query_log - -# 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 MariaDB -# currently measures time with second accuracy only). -long_query_time = 2 - -# The directory used by MySQL for storing temporary files. For example, -# it is used to perform disk based large sorts, as well as for internal -# and explicit temporary tables. It might be good to put it on a -# swapfs/tmpfs filesystem, if you do not create very large temporary -# files. Alternatively you can put it on dedicated disk. You can -# specify multiple paths here by separating them by ";" - they will then -# be used in a round-robin fashion. -#tmpdir = /tmp - -# *** Replication related settings - -# Unique server identification number between 1 and 2^32-1. This value -# is required for both master and slave hosts. It defaults to 1 if -# "master-host" is not set, but will MariaDB will not function as a master -# if it is omitted. -server-id = 1 - -# Replication Slave (comment out master section to use this) -# -# To configure this host as a replication slave, you can choose between -# two methods : -# -# 1) Use the CHANGE MASTER TO command (fully described in our manual) - -# the syntax is: -# -# CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>, -# MASTER_USER=<user>, MASTER_PASSWORD=<password> ; -# -# where you replace <host>, <user>, <password> by quoted strings and -# <port> by the master's port number (3306 by default). -# -# Example: -# -# CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306, -# MASTER_USER='joe', MASTER_PASSWORD='secret'; -# -# OR -# -# 2) Set the variables below. However, in case you choose this method, then -# start replication for the first time (even unsuccessfully, for example -# if you mistyped the password in master-password and the slave fails to -# connect), the slave will create a master.info file, and any later -# changes in this file to the variable values below will be ignored and -# overridden by the content of the master.info file, unless you shutdown -# the slave server, delete master.info and restart the slaver server. -# For that reason, you may want to leave the lines below untouched -# (commented) and instead use CHANGE MASTER TO (see above) -# -# required unique id between 2 and 2^32 - 1 -# (and different from the master) -# defaults to 2 if master-host is set -# but will not function as a slave if omitted -#server-id = 2 -# -# The replication master for this slave - required -#master-host = <hostname> -# -# The username the slave will use for authentication when connecting -# to the master - required -#master-user = <username> -# -# The password the slave will authenticate with when connecting to -# the master - required -#master-password = <password> -# -# The port the master is listening on. -# optional - defaults to 3306 -#master-port = <port> - -# Make the slave read-only. Only users with the SUPER privilege and the -# replication slave thread will be able to modify data on it. You can -# use this to ensure that no applications will accidentally modify data on -# the slave instead of the master -#read_only - - -#*** MyISAM Specific options - - -# Size of the Key Buffer, used to cache index blocks for MyISAM tables. -# Do not set it larger than 30% of your available memory, as some memory -# is also required by the OS to cache rows. Even if you're not using -# MyISAM tables, you should still set it to 8-64M as it will also be -# used for internal temporary disk tables. -key_buffer_size = 32M - -# MyISAM uses special tree-like cache to make bulk inserts (that is, -# INSERT ... SELECT, INSERT ... VALUES (...), (...), ..., and LOAD DATA -# INFILE) faster. This variable limits the size of the cache tree in -# bytes per thread. Setting it to 0 will disable this optimisation. Do -# not set it larger than "key_buffer_size" for optimal performance. -# This buffer is allocated when a bulk insert is detected. -bulk_insert_buffer_size = 64M - -# This buffer is allocated when MariaDB needs to rebuild the index in -# REPAIR, OPTIMIZE, ALTER table statements as well as in LOAD DATA INFILE -# into an empty table. It is allocated per thread so be careful with -# large settings. -myisam_sort_buffer_size = 128M - -# The maximum size of the temporary file MariaDB is allowed to use while -# recreating the index (during REPAIR, ALTER TABLE or LOAD DATA INFILE. -# If the file-size would be bigger than this, the index will be created -# through the key cache (which is slower). -myisam_max_sort_file_size = 10G - -# If a table has more than one index, MyISAM can use more than one -# thread to repair them by sorting in parallel. This makes sense if you -# have multiple CPUs and plenty of memory. -myisam_repair_threads = 1 - -# Automatically check and repair not properly closed MyISAM tables. -myisam_recover - -# *** INNODB Specific options *** - -# Use this option if you have a MariaDB server with InnoDB support enabled -# but you do not plan to use it. This will save memory and disk space -# and speed up some things. -#skip-innodb - -# 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 = 2G - -# InnoDB stores data in one or more data files forming the tablespace. -# If you have a single logical drive for your data, a single -# autoextending file would be good enough. In other cases, a single file -# per device is often a good choice. You can configure InnoDB to use raw -# disk partitions as well - please refer to the manual for more info -# about this. -innodb_data_file_path = ibdata1:10M:autoextend - -# Set this option if you would like the InnoDB tablespace files to be -# stored in another location. By default this is the MariaDB datadir. -#innodb_data_home_dir = <directory> - -# Number of IO threads to use for async IO operations. This value is -# hardcoded to 8 on Unix, but on Windows disk I/O may benefit from a -# larger number. -innodb_write_io_threads = 8 -innodb_read_io_threads = 8 - -# If you run into InnoDB tablespace corruption, setting this to a nonzero -# value will likely help you to dump your tables. Start from value 1 and -# increase it until you're able to dump the table successfully. -#innodb_force_recovery=1 - -# Number of threads allowed inside the InnoDB kernel. The optimal value -# depends highly on the application, hardware as well as the OS -# scheduler properties. A too high value may lead to thread thrashing. -innodb_thread_concurrency = 16 - -# 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 = 1 - -# Speed up InnoDB shutdown. This will disable InnoDB to do a full purge -# and insert buffer merge on shutdown. It may increase shutdown time a -# lot, but InnoDB will have to do it on the next startup instead. -#innodb_fast_shutdown - -# 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 = 8M - -# 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 - -# Total number of files in the log group. A value of 2-3 is usually good -# enough. -innodb_log_files_in_group = 3 - -# Location of the InnoDB log files. Default is the MariaDB datadir. You -# may wish to point it to a dedicated hard drive or a RAID1 volume for -# improved performance -#innodb_log_group_home_dir - -# Maximum allowed percentage of dirty pages in the InnoDB buffer pool. -# If it is reached, InnoDB will start flushing them out aggressively to -# not run out of clean pages at all. This is a soft limit, not -# guaranteed to be held. -innodb_max_dirty_pages_pct = 90 - -# 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 - -# How long an InnoDB transaction should wait for a lock to be granted -# before being rolled back. InnoDB automatically detects transaction -# deadlocks in its own lock table and rolls back the transaction. If you -# use the LOCK TABLES command, or other transaction-safe storage engines -# than InnoDB in the same transaction, then a deadlock may arise which -# InnoDB cannot notice. In cases like this the timeout is useful to -# resolve the situation. -innodb_lock_wait_timeout = 120 - - -[mysqldump] -# Do not buffer the whole result set in memory before writing it to -# file. Required for dumping very large tables -quick - -max_allowed_packet = 16M - -[mysql] -no-auto-rehash - -# Only allow UPDATEs and DELETEs that use keys. -#safe-updates - -[myisamchk] -key_buffer_size = 512M -sort_buffer_size = 512M -read_buffer = 8M -write_buffer = 8M - -[mysqlhotcopy] -interactive-timeout - -[mysqld_safe] -# Increase the amount of open files allowed per process. Warning: Make -# sure you have set the global system limit high enough! The high value -# is required for a large number of opened tables -open-files-limit = 8192 diff --git a/support-files/my-large.cnf.sh b/support-files/my-large.cnf.sh deleted file mode 100644 index 50f62e897ea..00000000000 --- a/support-files/my-large.cnf.sh +++ /dev/null @@ -1,150 +0,0 @@ -# Example MariaDB config file for large systems. -# -# This is for a large system with memory = 512M where the system runs mainly -# MariaDB. -# -# MariaDB programs look for option files in a set of -# locations which depend on the deployment platform. -# You can copy this option file to one of those -# locations. For information about these locations, do: -# 'my_print_defaults --help' and see what is printed under -# Default options are read from the following files in the given order: -# More information at: http://dev.mysql.com/doc/mysql/en/option-files.html -# -# In this file, you can use all long options that a program supports. -# If you want to know which options a program supports, run the program -# with the "--help" option. - -# The following options will be passed to all MariaDB clients -[client] -#password = your_password -port = @MYSQL_TCP_PORT@ -socket = @MYSQL_UNIX_ADDR@ - -# Here follows entries for some specific programs - -# The MariaDB server -[mysqld] -port = @MYSQL_TCP_PORT@ -socket = @MYSQL_UNIX_ADDR@ -skip-external-locking -key_buffer_size = 256M -max_allowed_packet = 1M -table_open_cache = 256 -sort_buffer_size = 1M -read_buffer_size = 1M -read_rnd_buffer_size = 4M -myisam_sort_buffer_size = 64M -thread_cache_size = 8 -query_cache_size= 16M -# Try number of CPU's*2 for thread_concurrency -thread_concurrency = 8 - -# Point the following paths to different dedicated disks -#tmpdir = /tmp/ - -# Don't listen on a TCP/IP port at all. This can be a security enhancement, -# if all processes that need to connect to mysqld run on the same host. -# All interaction with mysqld must be made via Unix sockets or named pipes. -# Note that using this option without enabling named pipes on Windows -# (via the "enable-named-pipe" option) will render mysqld useless! -# -#skip-networking - -# Replication Master Server (default) -# binary logging is required for replication -log-bin=mysql-bin - -# binary logging format - mixed recommended -binlog_format=mixed - -# required unique id between 1 and 2^32 - 1 -# defaults to 1 if master-host is not set -# but will not function as a master if omitted -server-id = 1 - -# Replication Slave (comment out master section to use this) -# -# To configure this host as a replication slave, you can choose between -# two methods : -# -# 1) Use the CHANGE MASTER TO command (fully described in our manual) - -# the syntax is: -# -# CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>, -# MASTER_USER=<user>, MASTER_PASSWORD=<password> ; -# -# where you replace <host>, <user>, <password> by quoted strings and -# <port> by the master's port number (3306 by default). -# -# Example: -# -# CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306, -# MASTER_USER='joe', MASTER_PASSWORD='secret'; -# -# OR -# -# 2) Set the variables below. However, in case you choose this method, then -# start replication for the first time (even unsuccessfully, for example -# if you mistyped the password in master-password and the slave fails to -# connect), the slave will create a master.info file, and any later -# change in this file to the variables' values below will be ignored and -# overridden by the content of the master.info file, unless you shutdown -# the slave server, delete master.info and restart the slaver server. -# For that reason, you may want to leave the lines below untouched -# (commented) and instead use CHANGE MASTER TO (see above) -# -# required unique id between 2 and 2^32 - 1 -# (and different from the master) -# defaults to 2 if master-host is set -# but will not function as a slave if omitted -#server-id = 2 -# -# The replication master for this slave - required -#master-host = <hostname> -# -# The username the slave will use for authentication when connecting -# to the master - required -#master-user = <username> -# -# The password the slave will authenticate with when connecting to -# the master - required -#master-password = <password> -# -# The port the master is listening on. -# optional - defaults to 3306 -#master-port = <port> -# -# binary logging - not required for slaves, but recommended -#log-bin=mysql-bin - -# Uncomment the following if you are using InnoDB tables -#innodb_data_home_dir = @localstatedir@ -#innodb_data_file_path = ibdata1:10M:autoextend -#innodb_log_group_home_dir = @localstatedir@ -# You can set .._buffer_pool_size up to 50 - 80 % -# of RAM but beware of setting memory usage too high -#innodb_buffer_pool_size = 256M -# Set .._log_file_size to 25 % of buffer pool size -#innodb_log_file_size = 64M -#innodb_log_buffer_size = 8M -#innodb_flush_log_at_trx_commit = 1 -#innodb_lock_wait_timeout = 50 - -[mysqldump] -quick -max_allowed_packet = 16M - -[mysql] -no-auto-rehash -# Remove the next comment character if you are not familiar with SQL -#safe-updates - -[myisamchk] -key_buffer_size = 128M -sort_buffer_size = 128M -read_buffer = 2M -write_buffer = 2M - -[mysqlhotcopy] -interactive-timeout diff --git a/support-files/my-medium.cnf.sh b/support-files/my-medium.cnf.sh deleted file mode 100644 index 77d60b5d724..00000000000 --- a/support-files/my-medium.cnf.sh +++ /dev/null @@ -1,148 +0,0 @@ -# Example MariaDB config file for medium systems. -# -# This is for a system with little memory (32M - 64M) where MariaDB plays -# an important part, or systems up to 128M where MariaDB is used together with -# other programs (such as a web server) -# -# MariaDB programs look for option files in a set of -# locations which depend on the deployment platform. -# You can copy this option file to one of those -# locations. For information about these locations, do: -# 'my_print_defaults --help' and see what is printed under -# Default options are read from the following files in the given order: -# More information at: http://dev.mysql.com/doc/mysql/en/option-files.html -# -# In this file, you can use all long options that a program supports. -# If you want to know which options a program supports, run the program -# with the "--help" option. - -# The following options will be passed to all MariaDB clients -[client] -#password = your_password -port = @MYSQL_TCP_PORT@ -socket = @MYSQL_UNIX_ADDR@ - -# Here follows entries for some specific programs - -# The MariaDB server -[mysqld] -port = @MYSQL_TCP_PORT@ -socket = @MYSQL_UNIX_ADDR@ -skip-external-locking -key_buffer_size = 16M -max_allowed_packet = 1M -table_open_cache = 64 -sort_buffer_size = 512K -net_buffer_length = 8K -read_buffer_size = 256K -read_rnd_buffer_size = 512K -myisam_sort_buffer_size = 8M - -# Point the following paths to different dedicated disks -#tmpdir = /tmp/ - -# Don't listen on a TCP/IP port at all. This can be a security enhancement, -# if all processes that need to connect to mysqld run on the same host. -# All interaction with mysqld must be made via Unix sockets or named pipes. -# Note that using this option without enabling named pipes on Windows -# (via the "enable-named-pipe" option) will render mysqld useless! -# -#skip-networking - -# Replication Master Server (default) -# binary logging is required for replication -log-bin=mysql-bin - -# binary logging format - mixed recommended -binlog_format=mixed - -# required unique id between 1 and 2^32 - 1 -# defaults to 1 if master-host is not set -# but will not function as a master if omitted -server-id = 1 - -# Replication Slave (comment out master section to use this) -# -# To configure this host as a replication slave, you can choose between -# two methods : -# -# 1) Use the CHANGE MASTER TO command (fully described in our manual) - -# the syntax is: -# -# CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>, -# MASTER_USER=<user>, MASTER_PASSWORD=<password> ; -# -# where you replace <host>, <user>, <password> by quoted strings and -# <port> by the master's port number (3306 by default). -# -# Example: -# -# CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306, -# MASTER_USER='joe', MASTER_PASSWORD='secret'; -# -# OR -# -# 2) Set the variables below. However, in case you choose this method, then -# start replication for the first time (even unsuccessfully, for example -# if you mistyped the password in master-password and the slave fails to -# connect), the slave will create a master.info file, and any later -# change in this file to the variables' values below will be ignored and -# overridden by the content of the master.info file, unless you shutdown -# the slave server, delete master.info and restart the slaver server. -# For that reason, you may want to leave the lines below untouched -# (commented) and instead use CHANGE MASTER TO (see above) -# -# required unique id between 2 and 2^32 - 1 -# (and different from the master) -# defaults to 2 if master-host is set -# but will not function as a slave if omitted -#server-id = 2 -# -# The replication master for this slave - required -#master-host = <hostname> -# -# The username the slave will use for authentication when connecting -# to the master - required -#master-user = <username> -# -# The password the slave will authenticate with when connecting to -# the master - required -#master-password = <password> -# -# The port the master is listening on. -# optional - defaults to 3306 -#master-port = <port> -# -# binary logging - not required for slaves, but recommended -#log-bin=mysql-bin - -# Uncomment the following if you are using InnoDB tables -#innodb_data_home_dir = @localstatedir@ -#innodb_data_file_path = ibdata1:10M:autoextend -#innodb_log_group_home_dir = @localstatedir@ -# You can set .._buffer_pool_size up to 50 - 80 % -# of RAM but beware of setting memory usage too high -#innodb_buffer_pool_size = 16M -# Set .._log_file_size to 25 % of buffer pool size -#innodb_log_file_size = 5M -#innodb_log_buffer_size = 8M -#innodb_flush_log_at_trx_commit = 1 -#innodb_lock_wait_timeout = 50 - -[mysqldump] -quick -max_allowed_packet = 16M - -[mysql] -no-auto-rehash -# Remove the next comment character if you are not familiar with SQL -#safe-updates - -[myisamchk] -key_buffer_size = 20M -sort_buffer_size = 20M -read_buffer = 2M -write_buffer = 2M - -[mysqlhotcopy] -interactive-timeout diff --git a/support-files/my-small.cnf.sh b/support-files/my-small.cnf.sh deleted file mode 100644 index 511a48627fd..00000000000 --- a/support-files/my-small.cnf.sh +++ /dev/null @@ -1,88 +0,0 @@ -# Example MySQL config file for small systems. -# -# This is for a system with little memory (<= 64M) where MySQL is only used -# from time to time and it's important that the mysqld daemon -# doesn't use much resources. -# -# MySQL programs look for option files in a set of -# locations which depend on the deployment platform. -# You can copy this option file to one of those -# locations. For information about these locations, see: -# http://dev.mysql.com/doc/mysql/en/option-files.html -# -# In this file, you can use all long options that a program supports. -# If you want to know which options a program supports, run the program -# with the "--help" option. - -# The following options will be passed to all MySQL clients -[client] -#password = your_password -port = @MYSQL_TCP_PORT@ -socket = @MYSQL_UNIX_ADDR@ - -# Here follows entries for some specific programs - -# The MySQL server -[mysqld] -port = @MYSQL_TCP_PORT@ -socket = @MYSQL_UNIX_ADDR@ -skip-external-locking -key_buffer_size = 16K -max_allowed_packet = 1M -table_open_cache = 4 -sort_buffer_size = 64K -read_buffer_size = 256K -read_rnd_buffer_size = 256K -net_buffer_length = 2K -thread_stack = 240K - -# Don't listen on a TCP/IP port at all. This can be a security enhancement, -# if all processes that need to connect to mysqld run on the same host. -# All interaction with mysqld must be made via Unix sockets or named pipes. -# Note that using this option without enabling named pipes on Windows -# (using the "enable-named-pipe" option) will render mysqld useless! -# -#skip-networking -server-id = 1 - -# Uncomment the following if you want to log updates -#log-bin=mysql-bin - -# binary logging format - mixed recommended -#binlog_format=mixed - -# Causes updates to non-transactional engines using statement format to be -# written directly to binary log. Before using this option make sure that -# there are no dependencies between transactional and non-transactional -# tables such as in the statement INSERT INTO t_myisam SELECT * FROM -# t_innodb; otherwise, slaves may diverge from the master. -#binlog_direct_non_transactional_updates=TRUE - -# Uncomment the following if you are using InnoDB tables -#innodb_data_home_dir = @localstatedir@ -#innodb_data_file_path = ibdata1:10M:autoextend -#innodb_log_group_home_dir = @localstatedir@ -# You can set .._buffer_pool_size up to 50 - 80 % -# of RAM but beware of setting memory usage too high -#innodb_buffer_pool_size = 16M -# Set .._log_file_size to 25 % of buffer pool size -#innodb_log_file_size = 5M -#innodb_log_buffer_size = 8M -#innodb_flush_log_at_trx_commit = 1 -#innodb_lock_wait_timeout = 50 - -[mysqldump] -quick -max_allowed_packet = 16M - -[mysql] -no-auto-rehash -# Remove the next comment character if you are not familiar with SQL -#safe-updates - -[myisamchk] -key_buffer_size = 8M -sort_buffer_size = 8M - -[mysqlhotcopy] -interactive-timeout diff --git a/support-files/mysqld_multi.server.sh b/support-files/mysqld_multi.server.sh index 75908a5db9d..f00c6a56af1 100644 --- a/support-files/mysqld_multi.server.sh +++ b/support-files/mysqld_multi.server.sh @@ -14,8 +14,23 @@ # Version 1.0 # -basedir=/usr/local/mysql -bindir=/usr/local/mysql/bin +### BEGIN INIT INFO +# Provides: mysqld_multi +# Required-Start: $local_fs $network $remote_fs +# Should-Start: ypbind nscd ldap ntpd xntpd +# Required-Stop: $local_fs $network $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start and stop multiple mysql database server daemon instances +# Description: Controls multiple MariaDB database server daemon instances +### END INIT INFO + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +NAME=mysqld_multi +DESC=mysqld_multi + +basedir=/usr +bindir=/usr/bin if test -x $bindir/mysqld_multi then diff --git a/support-files/policy/apparmor/usr.sbin.mysqld b/support-files/policy/apparmor/usr.sbin.mysqld index 4b05a58026d..6555c614889 100644 --- a/support-files/policy/apparmor/usr.sbin.mysqld +++ b/support-files/policy/apparmor/usr.sbin.mysqld @@ -101,13 +101,11 @@ /usr/bin/cut rix, /usr/bin/dirname rix, /usr/bin/gawk rix, - /usr/bin/innobackupex rix, /usr/bin/mysql rix, /usr/bin/perl rix, /usr/bin/seq rix, /usr/bin/wsrep_sst* rix, /usr/bin/wsrep_sst_common r, - /usr/bin/xtrabackup* rix, /usr/bin/mariabackup* rix, /var/lib/mysql/ r, /var/lib/mysql/** rw, diff --git a/support-files/policy/selinux/mariadb-server.fc b/support-files/policy/selinux/mariadb-server.fc index 39ec152c1ec..e3f2b5015c7 100644 --- a/support-files/policy/selinux/mariadb-server.fc +++ b/support-files/policy/selinux/mariadb-server.fc @@ -6,6 +6,5 @@ /var/lib/mysql/.*\.err -- gen_context(system_u:object_r:mysqld_log_t,s0) /var/lib/mysql/.*\.pid -- gen_context(system_u:object_r:mysqld_var_run_t,s0) /var/lib/mysql/.*\.cnf -- gen_context(system_u:object_r:mysqld_etc_t,s0) -/usr/bin/xtrabackup.* -- gen_context(system_u:object_r:mysqld_exec_t,s0) /usr/bin/mariabackup.* -- gen_context(system_u:object_r:mysqld_exec_t,s0) /usr/bin/wsrep.* -- gen_context(system_u:object_r:mysqld_safe_exec_t,s0) diff --git a/support-files/policy/selinux/mariadb-server.te b/support-files/policy/selinux/mariadb-server.te index 45ef40f4153..71924012283 100644 --- a/support-files/policy/selinux/mariadb-server.te +++ b/support-files/policy/selinux/mariadb-server.te @@ -78,7 +78,7 @@ allow mysqld_t user_tmp_t:file create; allow mysqld_t bin_t:lnk_file read; allow mysqld_t tmp_t:file { append create read write open getattr unlink setattr }; -# Allows too much leeway - the xtrabackup/wsrep rules in fc should fix it, but +# Allows too much leeway - the mariabackup/wsrep rules in fc should fix it, but # keep for the moment. allow mysqld_t shell_exec_t:file { execute_no_trans getattr read execute open }; allow mysqld_t bin_t:file { getattr read execute open execute_no_trans ioctl }; @@ -93,7 +93,7 @@ allow mysqld_t tram_port_t:tcp_socket name_bind; # This rule allows port udp/4567 (see README) allow mysqld_t mysqld_port_t:udp_socket name_bind; -# Rules related to XtraBackup +# Rules related to mariabackup allow mysqld_t self:netlink_tcpdiag_socket { create nlmsg_read }; allow mysqld_t sysctl_net_t:file { read getattr open }; diff --git a/support-files/rpm/server.cnf b/support-files/rpm/server.cnf index 3dd39510105..f067afd0da3 100644 --- a/support-files/rpm/server.cnf +++ b/support-files/rpm/server.cnf @@ -39,8 +39,8 @@ # you can put MariaDB-only options here [mariadb] -# This group is only read by MariaDB-10.2 servers. +# This group is only read by MariaDB-10.3 servers. # If you use the same .cnf file for MariaDB of different versions, # use this group for options that older servers don't understand -[mariadb-10.2] +[mariadb-10.3] |