Jump to content

Mysql Events On?


blackps

Recommended Posts

Hi i don't know if i can set mysql event enabled on, i created an user with all privileges but say that i cant set event enabled on.. i need to set a events to delete information that i don't need any more. i try with creating a my.conf in etc but dint work it, i search it and i cut find and answer, i can create and event but is not enabled on so is not working... i don't know if i have to pay for that? can some one help me please thanks. Love HelioHost!!.. The best host in the world!!!..

 

Link to comment
Share on other sites

Unfortunately mysql events require you to have superuser permissions. If we were to grant our users those permissions it would mean that they could wreak all sorts of havok on the server. The could kill other people's mysql processes, change the server settings, lock up the whole mysql server so the root user wouldn't even be able to log in, etc. Obviously you don't want someone doing all that stuff to your databases so we can't grant super privileges to anyone on a shared server.

 

When people ask about mysql events we always recommend using a cron job that executes a script that does the required mysql queries. It works exactly the same without all of the security issues of super privilege. Let us know if you need help creating the cron job.

Link to comment
Share on other sites

Thanks to much... I will see if I can do it with java or php is because I saw that cron job are just enable for 2 times at day and also is more difficult for me XD is that I need to delete a token every 30 seconds lol is because they can stay more time in the database if no one use it, also I have to delete a temporal user every 3hrs if costumer doesn't confirm email.

Link to comment
Share on other sites

The cron through cpanel is limited to 2 runs per day, but you can set up an external cron to run as often as every 5 minutes. To do so just make a script that can be accessed externally like encryptedcompany.tk/process_db.php and let us know the url and how often you want it to execute.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...