MySQL: Can a stored procedure invoke a Java progra

2019-07-12 08:10发布

I have a MySQL stored procedure. I would like to have a stored procedure run some statements, then call a Java program. Then when the java program is complete, the stored procedure should finish.

The java program will connect to the database, do some analysis and then insert rows into other tables.

Is this possible?

1条回答
倾城 Initia
2楼-- · 2019-07-12 09:05

Yes. Take a look at The MySQL UDF Repository and the sys_exec function. You could use this to launch your Java code in a new JVM.

After you get that installed here is how you run it: https://dba.stackexchange.com/a/39547/14506

查看更多
登录 后发表回答