Perhaps the problem is with your encoding, be sure to install utf8 in python and try installing db:
set character_set_database = utf8; set character_set_server = utf8; set character_set_system = utf8; set collation_database = utf8_general_ci; set collation_server = utf8_general_ci; set names utf8;
Or using the Greek character set :-)
Python:
db = MySQLdb.connect(host="localhost", use_unicode = True, charset = "utf8", user=username, passwd=password, db=database)
Then, for output, you need to specify the line: Unicode:
print (yourStringFromDatabase).encode("iso-8859-1")
source share