Update 'mysql-8.0.sh'
The folowing Mysql config points are now deprecated and have been removed from the config: query_cache_limit = 1M query_cache_size = 16M
This commit is contained in:
39
mysql-8.0.sh
39
mysql-8.0.sh
@@ -2,10 +2,6 @@
|
||||
# MySQL #
|
||||
##------------##
|
||||
|
||||
|
||||
## mysql Password
|
||||
#password=<set me for testing purposes>
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
apt install gnupg -y
|
||||
@@ -18,7 +14,6 @@ debconf-set-selections <<< 'mysql-apt-config mysql-apt-config/select-product sel
|
||||
debconf-set-selections <<< 'mysql-apt-config mysql-apt-config/select-server select mysql-8.0'
|
||||
debconf-set-selections <<< 'mysql-apt-config mysql-apt-config/select-tools select '
|
||||
debconf-set-selections <<< 'mysql-apt-config mysql-apt-config/unsupported-platform select abort'
|
||||
|
||||
debconf-set-selections <<< "mysql-community-server mysql-community-server/root-pass password $password"
|
||||
debconf-set-selections <<< "mysql-community-server mysql-community-server/re-root-pass password $password"
|
||||
debconf-set-selections <<< "mysql-community-server mysql-server/default-auth-override select Use Legacy Authentication Method (Retain MySQL 5.x Compatibility)"
|
||||
@@ -27,8 +22,42 @@ wget https://dev.mysql.com/get/mysql-apt-config_0.8.13-1_all.deb -O /tmp/mysql-a
|
||||
dpkg -i /tmp/mysql-apt-conf.deb
|
||||
apt-get update
|
||||
apt-get install -y mysql-server
|
||||
|
||||
rm /etc/mysql/mysql.conf.d/mysqld.cnf
|
||||
cat > /etc/mysql/mysql.conf.d/mysqld.cnf <<- "EOF"
|
||||
[mysqld]
|
||||
user = mysql
|
||||
pid-file = /var/run/mysqld/mysqld.pid
|
||||
socket = /var/run/mysqld/mysqld.sock
|
||||
port = 3306
|
||||
basedir = /usr
|
||||
datadir = /var/lib/mysql
|
||||
tmpdir = /tmp
|
||||
lc-messages-dir = /usr/share/mysql
|
||||
skip-external-locking
|
||||
|
||||
innodb_buffer_pool_size = 1G # (adjust value here, 50%-70% of total RAM)
|
||||
innodb_log_file_size = 256M
|
||||
innodb_flush_log_at_trx_commit = 1 # may change to 2 or 0
|
||||
innodb_flush_method = O_DIRECT
|
||||
bind-address = 127.0.0.1
|
||||
key_buffer_size = 16M
|
||||
max_allowed_packet = 16M
|
||||
thread_stack = 192K
|
||||
thread_cache_size = 8
|
||||
myisam-recover-options = BACKUP
|
||||
#max_connections = 100
|
||||
#table_open_cache = 64
|
||||
#innodb-thread-concurrency = 10
|
||||
log_error = /var/log/mysql/error.log
|
||||
expire_logs_days = 10
|
||||
max_binlog_size = 100M
|
||||
EOF
|
||||
|
||||
systemctl restart mysql
|
||||
systemctl enable mysql
|
||||
|
||||
|
||||
##-----------------##
|
||||
# PhpMyAdmin #
|
||||
##-----------------##
|
||||
|
||||
Reference in New Issue
Block a user