MariaDb: mudanças entre as edições

De Wiki Doth
Ir para navegação Ir para pesquisar
Sem resumo de edição
Linha 48: Linha 48:


log_bin_trust_function_creators = 1; #https://aws.amazon.com/pt/premiumsupport/knowledge-center/rds-mysql-functions/
log_bin_trust_function_creators = 1; #https://aws.amazon.com/pt/premiumsupport/knowledge-center/rds-mysql-functions/
<blockquote>
enable SQL database triggers for the Amazon Relational Database Service (RDS).
If one attempts to create a SQL database trigger, then the database server will complain a confusing and misleading message like: “ERROR 1419 (HY000) at line #: 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)“.
It happens that Amazon decided to disable all user defined SQL code, as binary procedures could compromise the RDS architecture. And for this purpose, Amazon blocked granting the missing ‘SUPER’ privileges to any database user except the ‘rdsadmin’ user owned by Amazon itself.
As a workaround, one may set the mysterious parameter ‘log_bin_trust_function_creators’ to 1, that prevents the database from complaining against simple and inoffensive triggers.
</blockquote>


sql_mode = NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
sql_mode = NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION


time_zone = Brazil/East
time_zone = Brazil/East

Edição das 10h41min de 18 de janeiro de 2023

Informações do Banco de Dados

Backup

mysqldump -u user database > arquivo.sql

Usuários

  • Criar / Privilégios

CREATE USER 'nome'@'host' IDENTIFIED BY 'senha';

GRANT ALL PRIVILEGES ON schema.table to 'usuario'@'%host';

FLUSH PRIVILEGES;

Configuração Geral

  • /etc/mysql/mariadb.conf.d/50-server.conf
  • bind-address = 0.0.0.0
  • query_cache_limit = 64M
  • query_cache_size = 256M #16M

Tunning Options

  • key_buffer_size = 6G #myisam tables
  • innodb_buffer_pool_size = 6G
  • innodb_lock_wait_timeout = 120
  • thread_cache_size = 21
  • skip-name-resolve

Variáveis especiais

  • SET SESSION group_concat_max_len = 1000000;


  • SET SESSION group_concat_max_len=4294967295; - 32bits
  • SET GLOBAL group_concat_max_len=4294967295; - 54bits


Variáveis AWS

log_bin_trust_function_creators = 1; #https://aws.amazon.com/pt/premiumsupport/knowledge-center/rds-mysql-functions/

enable SQL database triggers for the Amazon Relational Database Service (RDS). If one attempts to create a SQL database trigger, then the database server will complain a confusing and misleading message like: “ERROR 1419 (HY000) at line #: 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)“. It happens that Amazon decided to disable all user defined SQL code, as binary procedures could compromise the RDS architecture. And for this purpose, Amazon blocked granting the missing ‘SUPER’ privileges to any database user except the ‘rdsadmin’ user owned by Amazon itself. As a workaround, one may set the mysterious parameter ‘log_bin_trust_function_creators’ to 1, that prevents the database from complaining against simple and inoffensive triggers.

sql_mode = NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

time_zone = Brazil/East