You need to read from stdin to retrieve the data in the python script e.g.
#!/usr/bin/env python
import sys
def hello(variable):
print variable
data = sys.stdin.read()
hello(data)
If all you want to do here is grab some data from a mysql database and then manipulate it with Python I would skip piping it into the script and just use the Python MySql module to do the SQL query.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…