← Back to team overview

maria-discuss team mailing list archive

Re: question about generating logs on MariaDB 10.1.21


Am 24.01.2017 um 23:27 schrieb Guillaume Lefranc:
Hi Chris,

In CentOS 7, error logs are handled by systemd.

as well as stdout and hence mariadb should *really* fix spit that startup lines into the general systemlog when "log-error" and "general_log_file" are configured - the fact that the service was started/stopped is logged by systemd anyways

mysqld: 2017-01-24 22:16:10 139841788156224 [Note] /usr/libexec/mysqld (mysqld 10.1.21-MariaDB) starting as process 14782..


Use the "journalctl -u mariadb.service" command to view them.

I have no idea what's wrong with the general logs though. Maybe that's
some permission issue. Please check that the mysql user can write in
/var/log/mysql. You might have success by changing the log path to your
datadir, e.g. to /mnt/mysqldbs/mysql.log, since mysqld can always write
in its own datadir.


On Tue, Jan 24, 2017 at 11:04 PM Chris Adams <chris.a.adams@xxxxxxxxxxx
<mailto:chris.a.adams@xxxxxxxxxxx>> wrote:


    __ __

    I have just moved from a MySQL 5.6 server on CentOS 6.8 to a MariaDB
    10.1.21 server on CentOS 7. It is installed and working. ____

    __ __

    I would like to set up some logging, but it has not gone as
    expected. I have binary logging working. However, I can’t generate
    general logs or error logs. Here is part of the /etc/my.cnf file:____

    __ __


    port            = 3306____

    socket          = /var/lib/mysql/mysql.sock____

    datadir = /mnt/mysqldbs____

    log_error = /var/log/mysql/error.log____

    general_log_file = /var/log/mysql/mysql.log____

    general_log = 1____

    log_bin = /mnt/mysqldbs/logs/mysql-bin____

    __ __

    I assume that after a restart, the logs will be generated, then
    logged to as events happen. As it is, no log files are generated. ____

Follow ups