Jump to content

how can i send mysql options with writer.pl?


wardevour

Recommended Posts

i've never used dbd or perl and i was hoping you could provide me with a quick answer. i want to send the command line arg "--event-scheduler=ON" each time the server connects to the sql database because editing the my.cnf isnt working and keeps the socket open and ive got to kill mysql just to connect again. not really sure what the problem is but i was hoping rather that keeping it on globally i could send the arg each time the writer connects to the server

 

edit: great now i see this isnt at all what i need... how do i delete the thread and try again lol

Link to comment
Share on other sites

better question would be whats the proper way to enable event-scheduler? it seems if i add the line event_scheduler=ON to my.cnf everytime i connect or writer.pl it leaves the socket open and i cant connect again without manually killing the mysql process...

 

or even more to the point how do i use add_recommended_mysql_events.sql on linux?

Link to comment
Share on other sites

You login with your mysql root user and execute that statement:

SET GLOBAL event_scheduler = ON;

 

See here for more info:

http://dev.mysql.com/doc/refman/5.1/en/events-configuration.html

 

That should keep it enabled. I am not sure but I thought it has been deactivated once...but it seems that it's now enabled forever. You can only activate it with an mysql admin user (may be root for you).

 

In phpMyAdmin if you login with your user for your server database and press the home button. There you can see a db information_schema. In there is a table EVENTS where you can see the events for this database (epoch or what your name is). information_schema is existent in any db.

There you can also see when your events have been executed for the last time.

Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...