我正在修改 /etc/mysql/mariadb.conf.d/50-server.cnf
当我添加以下代码时,我得到错误未知变量 'pid-file=/run/mysqld/mysqld.pid'
[mysql]
default-character-set = utf8mb4
我正在添加 mysql 标记,但它不在文件中,但我不明白为什么这一行会影响似乎在 mysql conf 文件中定义的 pid 变量。
有任何想法吗?
50-server.cnf的全部内容
[server]
[mysqld]
innodb-file-format=barracuda
innodb-file-per-table=1
innodb-large-prefix=1
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
[mysql]
default-character-set = utf8mb4
# * Basic Settings
#
user = mysql
pid-file = /run/mysqld/mysqld.pid
socket = /run/mysqld/mysqld.sock
#port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
lc-messages-dir = /usr/share/mysql
#skip-external-locking
bind-address = 127.0.0.1
query_cache_size = 16M
log_error = /var/log/mysql/error.log
expire_logs_days = 10
character-set-server = utf8mb4
collation-server = utf8mb4_general_ci
[embedded]
[mariadb]
[mariadb-10.3]