Commit c9a63657 by Feanil Patel

Check to make sure that the mysql service is running.

parent 4986a618
...@@ -127,8 +127,8 @@ def is_mysql_running(): ...@@ -127,8 +127,8 @@ def is_mysql_running():
""" """
# We use the MySQL CLI client and capture its stderr # We use the MySQL CLI client and capture its stderr
# If the client cannot connect successfully, stderr will be non-empty # If the client cannot connect successfully, stderr will be non-empty
output = os.popen('mysql -e "" 2>&1').read() output = os.popen('status mysql 2>&1').read()
return output == "" return output.startswith("mysql start/running, process")
def clear_mongo(): def clear_mongo():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment