logger.debug("TEST END!")
logger.info("TEST END!")
logger.warning("TEST END!")
logger.error("TEST END!")
logger.critical("TEST END!")
if 'response' not in jsonData.keys():
except pycurl.error as e: print(e)
# dict 형태로 row를 반환
cursor = db.cursor(pymysql.cursors.DictCursor)
cursor.execute("SELECT id, name FROM `table`")
rows=cursor.fetchall()
cursor.execute("SELECT id, name FROM `table`")
for i in xrange(cursor.rowcount):
id, name = cursor.fetchone()
print id, name
cursor.execute("SELECT id, name FROM `table`")
result = cursor.fetchmany()
while result:
for id, name in result:
print id, name
result = cursor.fetchmany()
cursor.execute("SELECT id, name FROM `table`")
for id, name in cursor.fetchall():
print id, name
import MySQLdb
conn = MySQLdb.connect(user="user", passwd="password", db="mydb")
cur = conn.cursor()
print "Executing query"
cur.execute("SELECT * FROM bigtable");
print "Starting loop"
row = cur.fetchone()
while row is not None:
print ", ".join([str(c) for c in row])
row = cur.fetchone()
cur.close()
conn.close()
$ which $EDITOR $ EDITOR=vi $ export EDITOR
update user set password=password('패스워드') where user='root'; flush privileges;
6. 아까 실행했던 mysqld_safe가 실행되고 있다면 죽인다.
7. mysql 서비스 시작.
8. 끝.
WARNING: You are running on a NUMA machine.
