01 2013 档案
摘要:背景: 数据库链接不上,报错: root@localhost:/var/log/mysql# mysql -uzjy -p -h192.168.1.111 --default-character-set=utf8 -P3306 Enter password: ERROR 2013 (HY000):
阅读全文
摘要:#!/usr/bin/env python# -*- coding: utf-8 -*-# 2/10/16 base trans. wrote by srcdog on 20th, April, 2009# ld elements in base 2, 10, 16.import os,sys# global definition# base = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F]base = [str(x) for x in range(10)] + [ chr(x) for x in range(ord('A')
阅读全文
摘要:颜色输出模块:termcolorhttp://pypi.python.org/pypi/termcolorfrom termcolor import coloredrandom 的 学习:#!/usr/bin/env python# -*- encoding: utf-8 -*import randomfrom termcolor import coloredbuytimes = 1try: times = input('想买几注(默认一注): ')except: times = 1while buytimes <= times: red = map(str,ran...
阅读全文
摘要:前言: 二进制日记录了数据库执行更改的操作,如Insert,Update,Delete等。不包括Select等不影响数据库记录的操作,因为没有对数据进行修改。二进制主要的功能有:复制(Replication)和恢复(Recovery)。具体的二进制里面的格式表示的意思请见这篇文章。 MySQL记录...
阅读全文
摘要:转自:http://hidba.org/?p=593今天下午在看死锁相关的文档,到线上查看一生产数据库的时候,正好发现了show engine innodb status有一个死锁的信息:LATEST DETECTED DEADLOCK------------------------120626 20:00:30*** (1) TRANSACTION:TRANSACTION 3 3052385643, ACTIVE 0 sec, process no 3898, OS thread id 1356507456 insertingmysql TABLES IN USE 1, locked 1LO
阅读全文
摘要:摘要: 提高工作效率,完成一个SQL导出EXCEL的功能。虽然MySQL 可以直接生成excel,但是还是想通过python实现。知识点: 1,安装paramiko模块,参考:这里或则执行apt-get install python-paramiko,也可以在google上搜索相关文章。 2,安装x
阅读全文