Skip to content

Zeroplex 生活隨筆

軟體開發、伺服器和生活瑣事

小 縮小字型大小。 中 重設字型大小。 大 放大字型大小。

MySQL 8.0 不再使用的設定參數

Posted on 2019 年 7 月 20 日2021 年 3 月 12 日 By 日落 在〈MySQL 8.0 不再使用的設定參數〉中尚無留言

以下幾個參數,在 MySQL 8.0 不在繼續支援、使用:

  • query-cache-type
  • query-cache-size
  • innodb_large_prefix

整理過後,我的 MySQL 8 設定檔如下:

[mysqld]
pid-file        = /var/run/mysqld/mysqld.pid
socket          = /var/run/mysqld/mysqld.sock
datadir         = /var/lib/mysql
log-error       = /var/log/mysql/error.log


default-authentication-plugin = mysql_native_password



performance_schema = Off

default-storage-engine         = InnoDB
character-set-server           = utf8mb4
collation-server               = utf8mb4_unicode_ci
init_connect='SET collation_connection = utf8mb4_unicode_ci'
init_connect='SET NAMES utf8mb4'





# LOGGING #
log-error    = /var/log/mysql/error.log
log-error                      = /var/lib/mysql/mysql-error.log
log-queries-not-using-indexes  = 1
slow-query-log                 = 1
slow-query-log-file            = /var/lib/mysql/mysql-slow.log
binlog_expire_logs_seconds     = 86400  # 1 day
max-binlog-cache-size          = 4M
max-binlog-size                = 128M



# MyISAM #
key-buffer-size                = 16M
myisam-recover-options         = FORCE,BACKUP
max-allowed-packet             = 16M
max-connect-errors             = 1000000




# BINARY LOGGING #
server-id                      = 4782375
log-bin                        = /var/lib/mysql/mysql-bin
expire-logs-days               = 14
sync-binlog                    = 1




# MyISAM #
key-buffer-size                = 16M
myisam-recover-options         = FORCE,BACKUP
max-allowed-packet             = 16M
max-connect-errors             = 1000000




# CACHES AND LIMITS #
tmp-table-size                 = 16M
max-heap-table-size            = 32M
max-connections                = 100
thread-cache-size              = 50
open-files-limit               = 65535
table-definition-cache         = 1024
table-open-cache               = 524288




# INNODB #
innodb-flush-method            = O_DIRECT
innodb-log-files-in-group      = 2
innodb-file-per-table          = 1
innodb-buffer-pool-size        = 16M
innodb-flush-log-at-trx-commit = 1
innodb-log-file-size           = 64M





# Recommended in standard MySQL setup
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_ALL_TABLES

# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0






[mysqldump]
default-character-set = utf8mb4

gist 連結:https://gist.github.com/johnroyer/43f18557ad9ff3070b1d22e7b957f950

Tags:MySQL

文章導覽

Previous Post: 家電的耗電量
Next Post: LibreOffice 加油啊

發佈留言 取消回覆

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *


其他

關於我  (About me)

小額贊助

  文章 RSS Feed

  留言 RSS Feed

Apache AWS Bash C/C++ Docker FreeBSD GCP Git Google Java JavaScript Laravel Linux Microsoft MSSQL MySQL Nginx PHP PHPUnit PostgreSQL Python Qt Ubuntu Unix Vim Web Windows WordPress XD 作業系統 分享 好站推薦 專題 攝影 新奇搞笑 新聞 旅遊 生活雜記 程式設計 網路架站 網頁設計 資訊學習 資訊安全 遊戲 音樂


創用 CC 授權條款
本著作係採用創用 CC 姓名標示-相同方式分享 4.0 國際 授權條款授權.