Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3744603
D2655.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
6 KB
Referenced Files
None
Subscribers
None
D2655.diff
View Options
diff --git a/roles/dbserver-mysql/mysql-server/cnf.sls b/roles/dbserver-mysql/mysql-server/cnf.sls
--- a/roles/dbserver-mysql/mysql-server/cnf.sls
+++ b/roles/dbserver-mysql/mysql-server/cnf.sls
@@ -14,7 +14,7 @@
# Required directories
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-/var/run/mysqld:
+/var/run/mysql:
file.directory:
- user: mysql
- group: mysql
@@ -36,9 +36,10 @@
# Configuration files
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-{{ dirs.etc }}/my.cnf:
- file.managed:
- - source: salt://roles/dbserver-mysql/mysql-server/files/my.cnf
+{{ dirs.etc }}/mysql/conf.d:
+ file.recurse:
+ - source: salt://roles/dbserver-mysql/mysql-server/files/conf.d
+ - clean: True # remove wsrep.cnf values (and empty config files)
- template: jinja
- context:
nodename: {{ grains['id'] }}
@@ -50,9 +51,17 @@
file.managed:
- source: salt://roles/dbserver-mysql/mysql-server/files/stopwords.txt
+# -------------------------------------------------------------
+# Service
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+{% if grains['os'] == 'FreeBSD' %}
+
/etc/rc.conf.d/mysql:
file.managed:
- source: salt://roles/dbserver-mysql/mysql-server/files/mysql.rc
- template: jinja
- context:
use_zfs: {{ use_zfs }}
+
+{% endif %}
diff --git a/roles/dbserver-mysql/mysql-server/files/conf.d/client.cnf b/roles/dbserver-mysql/mysql-server/files/conf.d/client.cnf
new file mode 100644
--- /dev/null
+++ b/roles/dbserver-mysql/mysql-server/files/conf.d/client.cnf
@@ -0,0 +1,27 @@
+# -------------------------------------------------------------
+# MariaDB configuration :: clients
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# License: Trivial work, not eligible to copyright
+# Source file: roles/dbserver-mysql/mysql-server/files/conf.d/client.cnf
+# -------------------------------------------------------------
+#
+# <auto-generated>
+# This file is managed by our rOPS SaltStack repository.
+#
+# Changes to this file may cause incorrect behavior
+# and will be lost if the state is redeployed.
+# </auto-generated>
+
+[client]
+port = 3306
+socket = /var/run/mysql/mysqld.sock
+
+[mariadb-client]
+prompt = \u@\h [\d]>\_
+no_auto_rehash
+
+[mariadb-dump]
+max_allowed_packet = 256M
+quote_names
+quick
diff --git a/roles/dbserver-mysql/mysql-server/files/my.cnf b/roles/dbserver-mysql/mysql-server/files/conf.d/server.cnf
rename from roles/dbserver-mysql/mysql-server/files/my.cnf
rename to roles/dbserver-mysql/mysql-server/files/conf.d/server.cnf
--- a/roles/dbserver-mysql/mysql-server/files/my.cnf
+++ b/roles/dbserver-mysql/mysql-server/files/conf.d/server.cnf
@@ -1,33 +1,25 @@
# -------------------------------------------------------------
-# MySQL configuration
+# MariaDB configuration :: servers
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
-# Created: 2015-04-21
# License: Trivial work, not eligible to copyright
+# Source file: roles/dbserver-mysql/mysql-server/files/conf.d/server.cnf
# -------------------------------------------------------------
-
-# -------------------------------------------------------------
-# Clients
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-[client]
-port = 3306
-socket = /var/run/mysqld/mysqld.sock
-
-[mysql]
-prompt = \u@\h [\d]>\_
-
-[mysqldump]
-quick
-max_allowed_packet = 32M
+#
+# <auto-generated>
+# This file is managed by our rOPS SaltStack repository.
+#
+# Changes to this file may cause incorrect behavior
+# and will be lost if the state is redeployed.
+# </auto-generated>
# -------------------------------------------------------------
# Server wrapper
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-[mysqld_safe]
-pid-file = /var/run/mysqld/mysqld.pid
-socket = /var/run/mysqld/mysqld.sock
+[mariadb-safe]
+pid-file = /var/run/mysql/mysqld.pid
+socket = /var/run/mysql/mysqld.sock
nice = 0
# -------------------------------------------------------------
@@ -35,14 +27,21 @@
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[mysqld]
-user = mysql
-pid-file = /var/run/mysqld/mysqld.pid
-socket = /var/run/mysqld/mysqld.sock
-port = 3306
+user = mysql
+pid-file = /var/run/mysql/mysqld.pid
+
basedir = /usr
tmpdir = /tmp
+datadir = /var/db/mysql
lc-messages-dir = {{ share }}/mysql
+bind-address = 127.0.0.1
+socket = /var/run/mysql/mysqld.sock
+port = 3306
+
+net_retry_count = 16384
+log_error = /var/log/mysql/mysqld.err
+
sql_mode = STRICT_ALL_TABLES
explicit_defaults_for_timestamp
@@ -52,12 +51,6 @@
max_binlog_size = 1000M
binlog_format = MIXED
-{% if use_zfs %}
-datadir = /var/db/mysql/mysql-root
-{% else %}
-datadir = /var/db/mysql
-{% endif %}
-
# -------------------------------------------------------------
# InnoDB / XtraDB configuration
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -71,7 +64,9 @@
innodb_file_per_table = off
-skip-innodb_doublewrite
+innodb_doublewrite = 0
+innodb_flush_method = O_DSYNC
+
{% endif %}
# -------------------------------------------------------------
@@ -104,22 +99,12 @@
# -------------------------------------------------------------
# Applications configuration
#
-# :: MediaWiki
# :: Phabricator
-# :: OTRS
#
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-# MediaWiki
-character_set_server = binary
-character_set_filesystem = binary
-collation_server = binary
-
# Phabricator
max_allowed_packet = 32M
ft_stopword_file = {{ etc }}/mysql/stopwords.txt
ft_min_word_len = 3
ft_boolean_syntax = ' |-><()~*:""&^'
-
-# OTRS
-key_buffer_size = 32M
diff --git a/roles/dbserver-mysql/mysql-server/files/mysql.rc b/roles/dbserver-mysql/mysql-server/files/mysql.rc
--- a/roles/dbserver-mysql/mysql-server/files/mysql.rc
+++ b/roles/dbserver-mysql/mysql-server/files/mysql.rc
@@ -7,10 +7,7 @@
# -------------------------------------------------------------
mysql_enable="YES"
-mysql_pidfile="/var/run/mysqld/mysqld.pid"
+mysql_rundir="/var/run/mysql"
+mysql_pidfile="/var/run/mysql/mysqld.pid"
-{% if use_zfs %}
-mysql_dbdir=/var/db/mysql/mysql-root
-{% else %}
mysql_dbdir=/var/db/mysql
-{% endif %}
diff --git a/roles/webserver-legacy/php-sites/files/php.ini b/roles/webserver-legacy/php-sites/files/php.ini
--- a/roles/webserver-legacy/php-sites/files/php.ini
+++ b/roles/webserver-legacy/php-sites/files/php.ini
@@ -20,7 +20,7 @@
date.timezone = "UTC"
[MySQLi]
-mysqli.default_socket = /var/run/mysqld/mysqld.sock
+mysqli.default_socket = /var/run/mysql/mysqld.sock
[Pdo_mysql]
-pdo_mysql.default_socket = /var/run/mysqld/mysqld.sock
+pdo_mysql.default_socket = /var/run/mysql/mysqld.sock
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 16, 07:40 (19 h, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2247233
Default Alt Text
D2655.diff (6 KB)
Attached To
Mode
D2655: Refresh MariaDB configuration
Attached
Detach File
Event Timeline
Log In to Comment