← Back to team overview

maria-discuss team mailing list archive

Re: TRIGGERing on new users

 

Hi Guillaume! Thank you for bringing some ideas to mind. When you said "set up an event which runs regularly", were you thinking of a cron job or some similar cron-like functionaility in MariaDB/MySQL, or something else? Can you elaborate?

On Fri, 2017 Jul 07, 10:22:28 (+0200), Guillaume Lefranc wrote:
> Hi Curtis,
> 
> two different solutions come to mind.
> 
> You could wrap your user creation in a stored procedure that does all the
> heavy lifting: create the user and perform the additional functions
> 
> Or, you could set up an event which runs regularly, checks if new users
> have been added, and if that is the case runs aforementioned functions.
> 
> Hope that helps!
> 
> -GL
> 
> 2017-07-07 0:41 GMT+02:00 Curtis Brown <Curtis.Brown@xxxxxxxxxxxxx>:
> 
> >
> > I apologize in advance if this is the wrong venue; please point me in a
> > more correct direction if that's the case.
> >
> > I want to perform some extra database functions when a new user is created
> > in our MariaDB installation. What I am learning though is that I can't
> > CREATE TRIGGERs against system tables like the user table in the mysql
> > database.
> >
> > I am using MariaDB v10.1.24 in an Ubuntu 16.04.2 environment
> >
> > Have others run across a similar situation? Are there techniques to work
> > around this? One thought I had was to enable general query log and either
> > monitor the file output or TRIGGER on the general_log table. Are there any
> > better suggestions? Thanks in advance.
> >
> >
> > --
> > Curtis Brown, unix system administrator        For general PC questions,
> > Academic Computing and Networking Services     call: 970-491-7276
> > Colorado State University                      email: help@xxxxxxxxxxxxx
> > curtis.brown@xxxxxxxxxxxxx            http://lib.colostate.edu/helpdesk/
> >
> > _______________________________________________
> > Mailing list: https://launchpad.net/~maria-discuss
> > Post to     : maria-discuss@xxxxxxxxxxxxxxxxxxx
> > Unsubscribe : https://launchpad.net/~maria-discuss
> > More help   : https://help.launchpad.net/ListHelp
> >


-- 
Curtis Brown, unix system administrator        For general PC questions,
Academic Computing and Networking Services     call: 970-491-7276
Colorado State University                      email: help@xxxxxxxxxxxxx
curtis.brown@xxxxxxxxxxxxx            http://lib.colostate.edu/helpdesk/


Follow ups

References