mysql插入数据不成功

import socket,MySQLdb,sys,random,time
conn=MySQLdb.connect('127.0.0.1','root','1','asterisk')
cursor=conn.cursor()
cursor.execute('insert into test(a) values(1)')
print "a"
cursor.close()
conn.close()
 
    
 
    
conn.commit()

你可能感兴趣的:(数据库)