Change mariadb's log directory MariaDB was installed using yum on Centos7 using repository http://yum.mariadb.org/10.3/centos7-amd64.  MariaDB's log files are sent to directory /var/lib/mysql.  How can I change the location to another location such as /var/log/mysql/?

[michael@developserver mysql]$ mysql -u root -p
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 19
Server version: 10.3.14-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]&gt; SET GLOBAL general_log_file='/var/log/mysql/developserver.log';
ERROR 1231 (42000): Variable 'general_log_file' can't be set to the value of '/var/log/mysql/developserver.log'
MariaDB [(none)]&gt; show global variables like '%general_log_file%';
+------------------+-------------------+
| Variable_name    | Value             |
+------------------+-------------------+
| general_log_file | developserver.log |
+------------------+-------------------+
1 rows in set (0.002 sec)

MariaDB [(none)]&gt;
There are a few reasons this can happen. 

1) The directory does not exist:

mysql&gt; SET GLOBAL general_log_file='/this/directory/does/not/exist/developserver.log';
ERROR 1231 (42000): Variable 'general_log_file' can't be set to the value of '/this/directory/does/not/exist/developserver.log'
mysql&gt; 


2) The directory exists, but you do not have permission to write to it &amp; create the new file:

root@ubuntu-xenial:~# chmod 000 /var/log/newmysqllogdirectory 
root@ubuntu-xenial:~# mysql -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 5.7.26-0ubuntu0.16.04.1 (Ubuntu)

Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql&gt; SET GLOBAL general_log_file='/var/log/newmysqllogdirectory/foo.log';
ERROR 1231 (42000): Variable 'general_log_file' can't be set to the value of '/var/log/newmysqllogdirectory/foo.log'
mysql&gt;