I pretend to show a personalized message at login in MariaDB ver. 10.1.37 , in accordance with the data in one table.
My idea was to use a stored procedure as shown in fromdual.com but i can't find the my.cnf in my disk (I'm using Xampp), so i created the file and added SET GLOBAL init_connect="CALL audit.login_trigger()";
but now I have this error:
error: Found option without preceding group in config file:
C:\xampp\mysql\my.cnf at line: 1 Fatal error in defaults handling.
Program aborted
Q1)What preceding group should I type?
In this pdf from fromdual there is no details on this topic.
Q2) is there any other method?
I have look in to this question but I need to check the tables to create the message
This same question has been made in server fault, but I think that this site is more adequate.
Best Answer
Your my.cnf file should have:
Or any other group name from running
mysqld --help --verbose
, there's a line likeThe following groups are read: mysqld server mysqld-10.1 mariadb mariadb-10.1 client-server galera
, so any of those groups be can used instead of[mysqld]
.SET GLOBAL ...
is for setting mysqld system variables at runtime. The config file takes the shorter form.