[英]What is the alternative of mysqlcheck in python3?
I need to use mysqlcheck cmd for optimizing tables in the database.我需要使用 mysqlcheck cmd 来优化数据库中的表。 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.
我在python中为整个过程创建了一个Lambda函数,现在要执行整个过程首先我需要优化数据库的所有表。
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:我在python中使用PyMSQL模块连接数据库,但我猜PyMSQL没有提供优化表的能力,然后我尝试使用子进程模块运行OS命令mysqlcheck,但得到以下错误:
[ERROR] FileNotFoundError: [Errno 2] No such file or directory: 'mysqlcheck'
[错误] FileNotFoundError:[Errno 2] 没有这样的文件或目录:'mysqlcheck'
Can you tell me is any alternative of mysqlcheck is present in python Or how i can run mysqlcheck CMD in AWS Lambda?你能告诉我python中是否存在mysqlcheck的任何替代品或者我如何在AWS Lambda中运行mysqlcheck CMD?
Thank You.谢谢你。
另一种方法是将您的表从ENGINE=MyISAM
(有时需要OPTIMIZE
)移到ENGINE=InnoDB
(如果它自己需要注意)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.