hi,
one of our web application (I-DOIT) wants to create a function:
Database error : Query error: ’
CREATE FUNCTION alphas(str CHAR(100)) RETURNS CHAR(100) DETERMINISTIC READS SQL DATA
BEGIN
DECLARE i, len SMALLINT DEFAULT 1;
DECLARE ret CHAR(100) DEFAULT ‘’;
DECLARE c CHAR(1);
SET len = CHAR_LENGTH( str );
REPEAT
BEGIN
SET c = MID( str, i, 1 );
IF c REGEXP ‘[[:alpha:]]’ THEN
SET ret=CONCAT(ret,c);
END IF;
SET i = i + 1;
END;
UNTIL i > len END REPEAT;
RETURN ret;
END’:
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)
is it save to enable the variable on all nodes? The application connects via HAproxy the cluster (roundrobin).
============================== =
[…]
GENERAL
port = 3306
user = mysql
default-storage-engine = InnoDB
socket = /var/lib/mysql/mysql.sock
pid-file = /var/lib/mysql/mysql.pid
MUST DO UTF8
collation-server = utf8_unicode_ci
character-set-server = utf8
init_connect = ‘SET NAMES utf8, collation_connection=utf8_unicode_ci’
MyISAM
key-buffer-size = 32M
myisam-recover = FORCE,BACKUP
SAFETY
max-allowed-packet = 25M
max-connect-errors = 1000000
skip-name-resolve
#sql-mode = ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_AUTO_VALUE_ON_ZERO,NO_ZERO_DATE,NO_ZERO_IN_DATE,ONLY_FULL_GROUP_BY
sql-mode = NO_ENGINE_SUBSTITUTION
dekativiert, wegen i-doit
innodb-strict-mode = 0
DATA STORAGE
datadir = /var/lib/mysql/
BINARY LOGGING
binlog_format = ROW
log-bin = /var/lib/mysql/mysql-bin
expire-logs-days = 2
max_binlog_size = 100M
sync-binlog = 1
CACHES AND LIMITS
tmp-table-size = 32M
max-heap-table-size = 32M
query-cache-type = 0
query-cache-size = 0
max-connections = 500
thread-cache-size = 50
open-files-limit = 65535
table-definition-cache = 4096
table-open-cache = 4096
INNODB
innodb-flush-method = O_DIRECT
innodb-log-files-in-group = 2
innodb-log-file-size = 256M
innodb-flush-log-at-trx-commit = 1
innodb-file-per-table = 1
innodb-buffer-pool-size = 6G
innodb_autoinc_lock_mode = 2
LOGGING
log-error = /var/lib/mysql/mysql-error.log
log-queries-not-using-indexes = 1
slow-query-log = 1
slow-query-log-file = /var/lib/mysql/mysql-slow.log
Cluster Configuration
wsrep_provider = /usr/lib/galera2/libgalera_smm.so
wsrep_provider_options = “pc.ignore_sb = yes; gcache.size=2G; gcache.page_size=1G”
wsrep_cluster_name = “XtraDB_Cluster”
wsrep_sst_method = xtrabackup-v2
wsrep_slave_threads = 16
wsrep_sst_auth = “sstuser:secret”
wsrep_cluster_address = “gcomm://…”
[sst]
streamfmt = xbstream
!includedir /etc/mysql/conf.d/
cu denny