MariaDb
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/
To 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.
https://techtavern.wordpress.com/2013/06/17/mysql-triggers-and-amazon-rds/
sql_mode = NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
time_zone = Brazil/East