question

luispinedamx-5036 avatar image
0 Votes"
luispinedamx-5036 asked luispinedamx-5036 commented

MariaDB 10.3 created with a "-log" version

Hi, I have created a MariaDB server in the West Europe region. I have selected version 10.3

Performance Configuration: General Purpose, 2 vCore(s), 5 GB

The server has been created using the version 10.3.23-MariaDB-log.

 show global variables like '%version%';
 +-----------------------------------+------------------------------------------+
 | Variable_name                     | Value                                    |
 +-----------------------------------+------------------------------------------+
 | in_predicate_conversion_threshold | 1000                                     |
 | innodb_version                    | 10.3.23                                  |
 | protocol_version                  | 10                                       |
 | slave_type_conversions            |                                          |
 | system_versioning_alter_history   | ERROR                                    |
 | system_versioning_asof            | DEFAULT                                  |
 | version                           | 10.3.23-MariaDB-log                      |
 | version_comment                   | MariaDB Server                           |
 | version_compile_machine           | x64                                      |
 | version_compile_os                | Win64                                    |
 | version_malloc_library            | system                                   |
 | version_source_revision           | 7a97b525ea6a3ff619e8d156bf11bfe5b3acf8c2 |
 | version_ssl_library               | YaSSL 2.4.4                              |
 +-----------------------------------+------------------------------------------+

The -log part is enabling the binary logs, which I need to be disabled.

 show global variables like 'log_bin';
 +---------------------------------+------------------------------+
 | Variable_name                   | Value                        |
 +---------------------------------+------------------------------+
 | log_bin                         | ON                           |
 +---------------------------------+------------------------------+

Is there a way to define the MINOR version or to change the server settings in order to set the log_bin to OFF?

I have tried what is suggested here including using init-connect without success (log_bin is a read-only variable). I have read in other forums that I should modify the configuration files and restart the server, but this does not seem to be an option in Azure DB for MariaDB.

Has anyone noticed/faced a similar issue?


azure-database-mariadb
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @luispinedamx-5036, welcome to Microsoft Q&A forum. Apologies for the trouble you have been facing. I have tried different ways to disable the 'log_bin' variable but not able to do it, hence it looks like a limitation.

However, I have reached out to internal Product team and asked if there is anyway to disable it. I will keep the response posted once I receive a reply from them.

0 Votes 0 ·
AnuragSharma-MSFT avatar image
0 Votes"
AnuragSharma-MSFT answered

Hi @luispinedamx-5036, below is the verbatim we received from the product team:

"Recently, we change the default storage platform for MariaDB. As part of this change we enable binary log by default and it cannot be disabled and it is required for backups and recovery of the managed service. As a result, we do not allow disabling of binary logs from service. This is by design."

However, could you please let us know the intent behind disabling it? This way we can check how could they possibly help us with your concern.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

luispinedamx-5036 avatar image
0 Votes"
luispinedamx-5036 answered luispinedamx-5036 commented

Hi @AnuragSharma-MSFT , sorry to write it as an answer but I cannot submit my comment ('Submit' button not working)

Yes sure, let me elaborate on my issue, might be useful for the community:

In our application we use sql triggers. Everything went fine as long as the log_bin were OFF, as in all of our previous servers. Now, with the log_bin ON, we get this message when a trigger gets activated:

 You do not have the SUPER privilege and binary logging is enabled (you might want to use the less safe log_bin_trust_function_creators variable)

We did set to ON the suggested variable log_bin_trust_function_creators to test as a workaround and it works, but this is NOT safe because it might have unintended consequences as explained in MariaDB's documentation, so using this variable is not an option

For security, we certainly cannot give SUPER privileges to the user either.

The problem is: being able to continue to execute our triggers, without enabling unsafe features.

Thanks,
Luis

· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @luispinedamx-5036, thanks for reverting back with details.

if we go through below link, it mentions that "if ALL connections to this server ALWAYS use row-based binary logging, the security issues do not exist and the binary logging cannot break, so you can safely set this to TRUE"
https://mariadb.com/docs/reference/mdb/system-variables/log_bin_trust_function_creators/

Also as per PG, "In Azure, binary log format is Row. This configuration is reserved. And this session configuration couldn’t be changed unless the user has super privilege. So on service side, we make sure ALL connections to this server ALWAYS use row-based binary logging. And then it is safe to set it as True."

Please let us know if that is helpful or if you have further query we would be glad to continue the discussion.

1 Vote 1 ·

Hi @luispinedamx-5036, just wanted to check if the reply helped you there. In case of any other queries please let us know.

0 Votes 0 ·

Hi @AnuragSharma-MSFT yes, thank you. We will set the variable log_bin_trust_function_creators to ON.

0 Votes 0 ·