I need to use mysqlcheck cmd for optimizing tables in the database. I've created a Lambda function in python for the whole process, now to execute the whole process first I need to optimize all tables of the database.
I'm using PyMSQL module in python for connecting DB, but I guess optimising tables ability is not provided by PyMSQL, Then I tried to use the subprocess module to run the OS command mysqlcheck, but got the following error:
[ERROR] FileNotFoundError: [Errno 2] No such file or directory: 'mysqlcheck'
Can you tell me is any alternative of mysqlcheck is present in python Or how i can run mysqlcheck CMD in AWS Lambda?
Thank You.