You are correct on both accounts. I am now informing myself about ‘journalctl’. Writing the logs to the datadir also worked.

 

Thank you for your help.

 

From: Guillaume Lefranc [mailto:guillaume.lefranc@mariadb.com]
Sent: Tuesday, January 24, 2017 2:28 PM
To: Chris Adams <ChrisAdams@oslmail.osl.state.or.us>; maria-discuss@lists.launchpad.net
Subject: Re: [Maria-discuss] question about generating logs on MariaDB 10.1.21

 

Hi Chris,

 

In CentOS 7, error logs are handled by systemd.

 

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.

 

Regards

GL

 

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

Hello,

 

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:

 

user=mysql

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.

 

Many thanks.

_______________________________________________
Mailing list: https://launchpad.net/~maria-discuss
Post to     : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp

--

Guillaume Lefranc

Remote DBA Services Manager

MariaDB Corporation