mysql
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
mysql [2009/08/04 05:18] – suapapa | mysql [2013/08/03 05:04] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 2: | Line 2: | ||
<code python> | <code python> | ||
import MySQLdb | import MySQLdb | ||
- | postCnt = cursor.execute(' | ||
db = MySQLdb.connect(db=' | db = MySQLdb.connect(db=' | ||
- | cursor = db.cursor() | + | #cursor = db.cursor() |
+ | cursor = db.cursor(MySQLdb.cursors.DictCursor) | ||
# | # | ||
cursor.description # | cursor.description # | ||
+ | postCnt = cursor.execute(' | ||
</ | </ | ||
+ | |||
+ | <img src="/ | ||
+ | |||
===== references ===== | ===== references ===== | ||
*[[http:// | *[[http:// | ||
Line 27: | Line 31: | ||
mysql> EXIT | mysql> EXIT | ||
</ | </ | ||
+ | 모든 테이블 지우기 | ||
+ | <code mysql> | ||
+ | mysqldump --single-transaction -uID -pPASS --add-drop-table --no-data DB_NAME \ | ||
+ | | grep ^DROP \ | ||
+ | | mysql -uID -pPASS DB_NAME | ||
+ | </ | ||
+ | |||
====== blog restore ====== | ====== blog restore ====== | ||
<code mysql> | <code mysql> | ||
Line 41: | Line 52: | ||
Rows matched: 1 Changed: 1 Warnings: 0 | Rows matched: 1 Changed: 1 Warnings: 0 | ||
- | mysql> select option_name, | + | mysql> select option_name, |
+ | +-------------+---------------------------------------+ | ||
| option_name | option_value | | option_name | option_value | ||
+-------------+---------------------------------------+ | +-------------+---------------------------------------+ |
mysql.1249363094.txt.gz · Last modified: 2013/08/03 05:04 (external edit)