MariaDB error :logrotate extra arguments for create ログローテートでエラーが出る。

設定ファイルは
このファイルからいただきました。
https://leben.mobi/blog/mysql-logrotate/linux/


/var/log/mysql/error.log
/var/log/mysql/slow_query.log
{
create 644 mysql mysql # ローテーション後に空のログファイルを新規作成する(パーミションとオーナーを指定)
notifempty # ファイルが空の場合はローテーションしない
daily # 毎日ローテーソンを実行する
rotate 30 # 30世代分古いログを残す
missingok # ログファイルが存在しなくてもエラーを出さずに処理を続行する
nocompress # ローテーションしたログの圧縮を行わない
dateext # ローテーションしたファイルの名称に日付を付与する
sharedscripts # ログファイルを複数指定している場合、postrotate内に記述したスクリプトを一回だけ実行
postrotate # ログローテーション後に以下のスクリプトを実行
if test -x /usr/bin/mysqladmin && \
/usr/bin/mysqladmin ping &>/dev/null
then
/usr/bin/mysqladmin --defaults-extra-file=/root/.my.cnf flush-logs
fi
endscript
}

/var/log/mysql/query.log
{
create 644 mysql mysql
notifempty
daily
rotate 14 # 14世代分古いログを残す
missingok
nocompress
dateext
postrotate
# just if mysqld is really running
if test -x /usr/bin/mysqladmin && \
/usr/bin/mysqladmin ping &>/dev/null
then
/usr/bin/mysqladmin --defaults-extra-file=/root/.my.cnf flush-logs
fi
endscript
}

logrotate -dv /etc/logrotate.d/mysql-logs
デバッグすると、
extra arguments for create ~ 
とエラーが出てダメです。権限等を確認してもだめ・・・

なるほど。できました!
設定ファイルのコメントを全て削除してください。