I just tried the testmysql.py script: #!/usr/bin/python3 # coding=utf-8
import cgitb; cgitb.enable() import cgi, re, os, sys, socket, datetime, MySQLdb, locale, random, subprocess # connect to database con = MySQLdb.connect( db = 'nikos_metrites', host = 'localhost', user = 'nikos_nikos', passwd = 'tiabhp2r#', init_command='SET NAMES UTF8' ) cur = con.cursor() print ( "Content-type: text/html; charset=utf-8\n" ) # ================================================================================================================= # if extra string is attached to the URL is 'log' then show explicit page log and exit # ================================================================================================================= cur.execute('''SELECT hits FROM counters''') data = cur.fetchall() #URL is unique, so should only be one for item in data: print( item ) =================== it works, as you can see at: http://superhost.gr/cgi-bin/testmysql.py so MySQLdb mpodule does work for Python3 !!!!! so mysql connector is not the problem. but hwta is it then i get no errors!! -- http://mail.python.org/mailman/listinfo/python-list