Update 'mysql-5.7.sh'
This commit is contained in:
40
mysql-5.7.sh
40
mysql-5.7.sh
@@ -18,6 +18,46 @@ mysql -u root -p"$password" -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH my
|
|||||||
mysql -u root -p"$password" -e "FLUSH PRIVILEGES;"
|
mysql -u root -p"$password" -e "FLUSH PRIVILEGES;"
|
||||||
mysql -u root -p"$password" -e "SELECT user,authentication_string,plugin,host FROM mysql.user;"
|
mysql -u root -p"$password" -e "SELECT user,authentication_string,plugin,host FROM mysql.user;"
|
||||||
|
|
||||||
|
rm /etc/mysql/my.cnf
|
||||||
|
cat > /etc/mysql/my.cnf <<- "EOF"
|
||||||
|
# - "/etc/mysql/my.cnf" to set global options,
|
||||||
|
[mysqld_safe]
|
||||||
|
socket = /var/run/mysqld/mysqld.sock
|
||||||
|
nice = 0
|
||||||
|
|
||||||
|
[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
|
||||||
|
#thread_concurrency = 10
|
||||||
|
query_cache_limit = 1M
|
||||||
|
query_cache_size = 16M
|
||||||
|
log_error = /var/log/mysql/error.log
|
||||||
|
expire_logs_days = 10
|
||||||
|
max_binlog_size = 100M
|
||||||
|
EOF
|
||||||
|
|
||||||
|
systemctl restart mysql
|
||||||
|
|
||||||
##----------------##
|
##----------------##
|
||||||
# PHPMyAdmin #
|
# PHPMyAdmin #
|
||||||
##----------------##
|
##----------------##
|
||||||
|
|||||||
Reference in New Issue
Block a user