-
Notifications
You must be signed in to change notification settings - Fork 115
Expand file tree
/
Copy pathlocal.sh.mysql_fix
More file actions
executable file
·46 lines (34 loc) · 1.25 KB
/
local.sh.mysql_fix
File metadata and controls
executable file
·46 lines (34 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/env bash
#IMPORTANT: THIS FIX IS APPLICABLE ONLY FOR DEVSTACK KILO RELEASE
#For devstack master branch, the fix is already provided upstream
# `local.sh.mysql_fixup`` for user-configurable tasks to run automatically
# at the successful conclusion of ``stack.sh``.
# NOTE: Copy this file to the root DevStack directory for it to work properly.
# Keep track of the DevStack directory
TOP_DIR=$(cd $(dirname "$0") && pwd)
# Import common functions
. $TOP_DIR/functions
# Use openrc + stackrc + localrc for settings
. $TOP_DIR/stackrc
# Destination path for installation ``DEST``
DEST=${DEST:-/opt/stack}
echo_summary "Configuring additional parameters for mysql database"
if is_service_enabled mysql; then
if is_ubuntu; then
my_conf=/etc/mysql/my.cnf
mysql=mysql
elif is_suse || is_oraclelinux; then
my_conf=/etc/my.cnf
mysql=mysql
elif is_fedora; then
mysql=mariadb
my_conf=/etc/my.cnf
else
exit_distro_not_supported "mysql configuration"
fi
sudo bash -c ". $TOP_DIR/functions && \
iniset $my_conf mysqld max_connections 1024 && \
iniset $my_conf mysqld query_cache_type OFF && \
iniset $my_conf mysqld query_cache_size 0"
restart_service $mysql
fi