简体   繁体   中英

What is the alternative of mysqlcheck in python3?

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.

另一种方法是将您的表从ENGINE=MyISAM有时需要OPTIMIZE )移到ENGINE=InnoDB (如果它自己需要注意)。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM