forked from nemke82/magento2gitpod
-
Notifications
You must be signed in to change notification settings - Fork 0
/
switch-mysql8.sh
22 lines (22 loc) · 942 Bytes
/
switch-mysql8.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
sudo supervisorctl stop mysql;
sudo percona-release enable ps-80 release;
sudo apt-get update -y;
set -ex; \
{ \
for key in \
percona-server-server/root_password \
percona-server-server/root_password_again \
"percona-server-server-$PERCONA_MAJOR/root-pass" \
"percona-server-server-$PERCONA_MAJOR/re-root-pass" \
; do \
sudo echo "percona-server-server-$PERCONA_MAJOR" "$key" password 'nem4540'; \
done; \
} | sudo debconf-set-selections;
sudo apt-get update;
sudo apt-get upgrade -y percona-server-server percona-server-client percona-server-common;
sed -i 's#query_cache_limit=2M##g' /etc/mysql/conf.d/mysqld.cnf;
sed -i 's#query_cache_size=128M##g' /etc/mysql/conf.d/mysqld.cnf;
sed -i 's#query_cache_type=1##g' /etc/mysql/conf.d/mysqld.cnf;
sudo echo "default_authentication_plugin=mysql_native_password" >> /etc/mysql/conf.d/mysqld.cnf;
sudo chown -R gitpod:gitpod /var/run/mysqld/;
sudo supervisorctl start mysql