0

I'm trying to make moodle work on my system, so i need to change bin_log format to MIXED or ROW.

But, i'm having a lot of problems doing that. Any changes i try to do don't work;

MariaDB [(none)]> SHOW VARIABLES LIKE 'binlog_format'
    -> ;
+---------------+-----------+
| Variable_name | Value     |
+---------------+-----------+
| binlog_format | STATEMENT |
+---------------+-----------+
1 row in set (0.00 sec)

MariaDB [(none)]> SET GLOBAL binlog_format = 'ROW';
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> SHOW VARIABLES LIKE 'binlog_format'
    -> ;
+---------------+-----------+
| Variable_name | Value     |
+---------------+-----------+
| binlog_format | STATEMENT |
+---------------+-----------+
1 row in set (0.00 sec)

And i've also set binlog_format=row on my.cnf. One weird thing i noticied is that it seems that the basedir is wrong. the mariadb basedir is /etc/mysql, but it shows /usr as basedir:

MariaDB [(none)]> SHOW VARIABLES LIKE 'basedir';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| basedir       | /usr  |
+---------------+-------+

Anyone knows what the problem can be?

1 Answer 1

1

"Global" settings are initial values for when you login. You failed to log out and log back in, hence it still said STATEMENT.

/etc/ is a place for configuration-like stuff, not for basedir.

/usr does not seem right for basedir, either. Perhaps /usr/mysql or /usr/mariadb?

7
  • I also did think that /etc/mysql is a very strange place fot a basedir, but here is what my /usr folder contains: bin games include lib local sbin share src And my /etc/mysql folder: conf.d debian.cnf debian-start my.cnf I did also spin up a new VPS and installed only MariaDB again from scratch, same thing happens. Logging out and back in, restarting the service, restarting the server, nothing did make the options stick, even with the my.cnf still saying "row". Commented Jan 20, 2016 at 3:03
  • my.cnf is a text file that contains configuration settings for MySQL or MariaDB.
    – Rick James
    Commented Jan 20, 2016 at 3:10
  • What arguments are on the running mysqld service?
    – Rick James
    Commented Jan 20, 2016 at 3:10
  • So what the basedir contains? I'm going to check the arguments, just a minute Commented Jan 20, 2016 at 3:15
  • usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --skip-log-error --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock --port=3306 Commented Jan 20, 2016 at 3:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.