MySQL 状态消息/日志存储在哪里?

MySQL 状态消息/日志存储在哪里?

当我跑步时service mysql status我得到:

mariadb.service - MariaDB 10.1.33 database server
   Loaded: loaded (/lib/systemd/system/mariadb.service; enabled)
  Drop-In: /etc/systemd/system/mariadb.service.d
           └─migrated-from-my.cnf-settings.conf
   Active: active (running) since Tue 2018-06-12 16:59:36 EDT; 4min 45s ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
  Process: 10381 ExecStartPost=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
  Process: 10368 ExecStartPost=/etc/mysql/debian-start (code=exited, status=0/SUCCESS)
  Process: 10186 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ]   && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS)
  Process: 10180 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
  Process: 10177 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
 Main PID: 10338 (mysqld)
   Status: "Taking your SQL requests now..."
   CGroup: /system.slice/mariadb.service
           └─10338 /usr/sbin/mysqld

Jun 12 16:59:36 some.fqdm.com mysqld[10338]: 2018-06-12 16:59:36 140338049574848 [Note] InnoDB:  Percona XtraDB (h...29464
Jun 12 16:59:36 some.fqdn.com mysqld[10338]: 2018-06-12 16:59:36 140337108481792 [Note] InnoDB: Dumping buffer poo...arted
Jun 12 16:59:36 some.fqdn.com mysqld[10338]: 2018-06-12 16:59:36 140338049574848 [Note] Plugin 'FEEDBACK' is disabled.
Jun 12 16:59:36 some.fqdn.com mysqld[10338]: 2018-06-12 16:59:36 140338049574848 [Note] Server socket created on IP: '::'.
Jun 12 16:59:36 some.fqdn.com mysqld[10338]: 2018-06-12 16:59:36 140338049574848 [Note] Reading of all Master_info...ceded
Jun 12 16:59:36 some.fqdn.com mysqld[10338]: 2018-06-12 16:59:36 140338049574848 [Note] Added new Master_info '' t...table
Jun 12 16:59:36 some.fqdn.com mysqld[10338]: 2018-06-12 16:59:36 140338049574848 [Note] /usr/sbin/mysqld: ready fo...ions.
Jun 12 16:59:36 some.fqdn.com mysqld[10338]: Version: '10.1.33-MariaDB-1~jessie'  socket: '/var/run/mysqld/mysqld....ution
Jun 12 16:59:36 some.fqdn.com mysqld[10368]: Checking for corrupt, not cleanly closed and upgrade needing tables.
Jun 12 16:59:36 some.fqdn.com systemd[1]: Started MariaDB 10.1.33 database server.
Hint: Some lines were ellipsized, use -l to show in full.
mariadb.service - MariaDB 10.1.33 database server
   Loaded: loaded (/lib/systemd/system/mariadb.service; enabled)
  Drop-In: /etc/systemd/system/mariadb.service.d
           └─migrated-from-my.cnf-settings.conf
   Active: active (running) since Tue 2018-06-12 16:59:36 EDT; 4min 45s ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
  Process: 10381 ExecStartPost=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
  Process: 10368 ExecStartPost=/etc/mysql/debian-start (code=exited, status=0/SUCCESS)
  Process: 10186 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ]   && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS)
  Process: 10180 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
  Process: 10177 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
 Main PID: 10338 (mysqld)
   Status: "Taking your SQL requests now..."
   CGroup: /system.slice/mariadb.service
           └─10338 /usr/sbin/mysqld

Jun 12 16:59:36 some.fqdm.com mysqld[10338]: 2018-06-12 16:59:36 140338049574848 [Note] InnoDB:  Percona XtraDB (h...29464
Jun 12 16:59:36 some.fqdn.com mysqld[10338]: 2018-06-12 16:59:36 140337108481792 [Note] InnoDB: Dumping buffer poo...arted
Jun 12 16:59:36 some.fqdn.com mysqld[10338]: 2018-06-12 16:59:36 140338049574848 [Note] Plugin 'FEEDBACK' is disabled.
Jun 12 16:59:36 some.fqdn.com mysqld[10338]: 2018-06-12 16:59:36 140338049574848 [Note] Server socket created on IP: '::'.
Jun 12 16:59:36 some.fqdn.com mysqld[10338]: 2018-06-12 16:59:36 140338049574848 [Note] Reading of all Master_info...ceded
Jun 12 16:59:36 some.fqdn.com mysqld[10338]: 2018-06-12 16:59:36 140338049574848 [Note] Added new Master_info '' t...table
Jun 12 16:59:36 some.fqdn.com mysqld[10338]: 2018-06-12 16:59:36 140338049574848 [Note] /usr/sbin/mysqld: ready fo...ions.
Jun 12 16:59:36 some.fqdn.com mysqld[10338]: Version: '10.1.33-MariaDB-1~jessie'  socket: '/var/run/mysqld/mysqld....ution
Jun 12 16:59:36 some.fqdn.com mysqld[10368]: Checking for corrupt, not cleanly closed and upgrade needing tables.
Jun 12 16:59:36 some.fqdn.com systemd[1]: Started MariaDB 10.1.33 database server.
Hint: Some lines were ellipsized, use -l to show in full.

问题是,带有时间戳的消息位于哪里?我找不到日志文件(如果有的话)。

答案1

它们位于 systemd 日志中。可以使用以下方式访问它们journalctl -u mariadb.service

相关内容