I'm trying to upload a .txt file to a table in my db every 5 minutes. When using this code I get an error saying Load Data infile is not aloud in a stored procedure. What are my alternatives? I'm not to familiar with anything outside SQL, python and java so a local solution in SQL would be preferred. Thanks!
CREATE PROCEDURE student_update ()
BEGIN
LOAD DATA LOCAL INFILE 'text file path'
INTO TABLE StudentTest
FIELDS TERMINATED BY ',';
END
CREATE EVENT update
ON SCHEDULE EVERY 5 MINUTE
DO
EXEC student_update