I think it is better to use events from mysql.
For more information, visit Using Event Planner
Or use the solution suggested by Michael .
Personally, I like to execute mysql using -ss and the socket file:
mysql -S/path_to_sock_file/mysql.sock -u user_name –p'12345' mydatabase -ss -e 'CALL my_stored_procedure()'
-ss returns the results as plain text.
Greets Arman.
Arman source
share