随笔分类 - MySQL
摘要:what we have?iRedMail -> http://iredmail.comGet the script over there. http://www.iredmail.com/download.htmlHere we use ubuntu14.04 as server.Just...
阅读全文
摘要:There is a link about how to re-set password.http://database.51cto.com/art/201010/229528.htmwords in short,two lines mysql> UPDATE mysql.user SET p...
阅读全文
摘要:there are several procedurewhich include:1. Install the packagessudo apt-get install php5 php5-gd php5-cgi php5-mysql libapache2-mod-php5 apache2 mysq...
阅读全文
摘要:在tornado 里面这样用看看logging.warning() , logging.info() , 我们非常想用 zdaemon , 和 logging 将对系统的所有访问转换到服务器里面,作为日志。让我们看看目录树。transaction.py 是tornado服务看一下 testpage1handler@require_basic_authclass TestPage1Handler(BaseHandler): """This is a test page to show the asker's utmost parent's all d
阅读全文
摘要:现在,我们用torndo做web开发框架,用他内部机制来处理HTTP请求。传说中的非阻塞式服务。整来整去,可谓之一波三折。可是,无论怎么样,算是被我做成功了。在tornado服务上,采用三种数据库模型--》1)torndb2)django model3)SQLAlchemy model 都同时输出相应的JSON,做API服务。(一个比一个强大的ORM model)都同时实现了一样的功能注意:要说明的一点是,在数据库建立模型的时候,是用到的django model建立的数据库模型。所以在使用torndb(SQL 操作语言的ORM) 和 django model的时候,非常简单操作,直接引用...
阅读全文
摘要:django的模型from django.db import models""" A model pair to map car and its manufacturer"""class Manufacturer(models.Model): brand = models.CharField(max_length=100) location = models.CharField(max_length=100) def __unicode__(self): return self.brand class Meta: ordering =
阅读全文
摘要:django User model operationthis tutorial will guide us to know how to manipulate django User model.Read User object derived from databasefrom django.contrib.auth.models import User# Those two lines are different even if there is only one user 'admin' who registered beforeauser = User.objects
阅读全文
摘要:tastypie is a good thing.Haven't test it thoroughly. Gonna need some provement.Now I will introduct how to use tastepie for newbies.Let me introduce all the equipments I have to deploy tastypie.1) linuxmint 132) virtualenv ( sudo apt-get install python-virtualenv )3) install django==1.5 in the v
阅读全文
摘要:Its one of the primary authors' lecture on pyCon: http://www.youtube.com/watch?v=Zv26xHYlc8s&noredirect=1What is Tastypie A REST framework for django Designed for extension Supports both Model & non-Model datafor more information, please visit http://tastypieapi.org1) make good use of HT
阅读全文
摘要:原文地址:http://www.cnblogs.com/XL-Liang/archive/2012/05/03/2481310.html这个地址也许更有帮助:http://www.cppblog.com/zzg/archive/2009/05/29/86066.html(这里有很多关于数据库处理的技巧)这么做,是新建了一个虚拟机,把数据库服务器放在虚拟机里面跑,然后通过虚拟机配置端口映射。一个电脑母机里面有很多子机的服务。这样有助于模拟与演示。1、登陆mysql数据库 mysql -u root -p 查看user表mysql> use mysql;Database changedmys
阅读全文
摘要:SQLAlchemy TrialThis is a great ORM ( Object-Relational Mapper ) which is compatible with xxxx and many others.SQLAlchemy 0.8 Documentationlink: http://docs.sqlalchemy.org/en/rel_0_8/orm/examples.html IMPORTANT TO GO THROUGHObject Relational Tutorialhttp://docs.sqlalchemy.org/en/rel_0_8/ 需要看...
阅读全文
摘要:please follow the tutorial from the official site :) http://flask.pocoo.org/docs/You could download the zipped file from this site : 下载离线版doc ,将更加方便查看。You can download the documentation in other formats as well:as PDFas ePubas .mobias zipped HTML要搭建博客,就需要至少有几个工具。1、搭建博客的工具——————python,建议搭配virtualen..
阅读全文
摘要:真是很好的东西,有很多有益处的东西。有template引擎,有flask自己带的g (用来处理访问与数据库打开关闭的)有flask自己的处理session的功能自带的jinja2模板引擎也是比较容易懂的。语法也不是很难。模板引擎设计比较科学,也比较符合python之道。即便是博客,也要了解博客的关系。还是比较给力的。提交表单后--》数据发送到数据库--》然后返回一个页面还是原来的带有表单的页面,不过这个表单的页面里面又实打实地是从数据库中取到的数据。在数据库中已经在表单提交的过程后被添加了。很有机的结合在一起。运用模板引擎的extend 拼接够能,能让多个模板相互继承,这真是jinja2的给力
阅读全文
摘要:有用的资料在 Linux mail 命令http://www.cnblogs.com/JemBai/archive/2012/01/24/2329136.html还有这里 Linux系统下mail命令使用http://www.php100.com/html/webkaifa/Linux/2009/0315/6309.html (介绍的挺详细的)可是上面的链接都没有说是怎么打开邮件代发服务的。所以在很大程度上,不是一个傻瓜教程。针对我的系统 linuxmint 13 , ubuntu 12.04 的衍生版,我准备采用这种方法一般准备开始使用的时候会遇到下面这样的问题发现不在/usr/lib/se
阅读全文
摘要:Linux+postfix+extmail+dovecot打造基于web页面的邮件系统 原文地址:http://blog.csdn.net/deansrk/article/details/6717720很有创意的给力的邮件系统!下面是构架图更加详尽的操作方法不用说,当然是去对方博客里面查看了。很不错值得尝试的构架。############### 需要额外注意的内容 ##################www.extmail.org 这个网站有好挖掘的东西,有很多内容是关于网络营销的。sendtruck 就是一个网络电子邮件营销的一个有效的解决方案。他们还维护了一个EMOS 根据centos4/
阅读全文
摘要:正如同标题,标题的顺序是先从Excel表单,保存为csv文档。步骤:1、这个可以用linux下的libra office打开 abc.xls2、用libra office 将 abc.xls 保存成 abc.csv 文档(此例里面,abc.csv 文件大小约有40多MB), 中间需要选择 delimeter 分割符, quote 等3、用搭建好的LAMP的环境,打开phpmyadmin,选择好以前建立的数据库。然后选择导入按钮。看到右边有数据库文件大小限制。我已经修改好了。大小限制是512MB,足够大的数据库了。一般的情况下,默认的数据库上传文档为2MB。具体可以看这里上传csv文档,转换成数
阅读全文
摘要:#2006 - MySQL server has gone away 问题解决方法原文地址:http://www.cnblogs.com/bisonjob/archive/2009/08/18/1548611.html1、应用程序(比如PHP)长时间的执行批量的MYSQL语句。最常见的就是采集或者新旧数据转化。解决方案:在my.ini文件中添加或者修改以下两个变量:wait_timeout=2880000interactive_timeout = 2880000关于两个变量的具体说明可以google或者看官方手册。如果不能修改my.cnf,则可以在连接数据库的时候设置CLIENT_INTERA
阅读全文
摘要:phpmyadmin上传大小限制原帖地址:http://www.hmidc.com/home/news/?13914.html时间:2011-6-21 11:17:57作者:红帽之家来源:红帽之家查看:712评论:0内容摘要:1. 遇到导入过大文件时,首先检查php.ini配置文件中的以下三个地方,upload_max_filesize,memory_limit和 post_max_size,并且推荐修改的值要稍大于导入的巨大sql数据库文件;依照这个提示,我修改了以上三个在php.ini中的...1.遇到导入过大文件时,首先检查php.ini 配置文件中的以下三个地方,upload_max_
阅读全文
摘要:建表:原帖地址: http://blog.sina.com.cn/s/blog_5da3d5c50100bjh0.htmlMySQLAUTO_INCREMENT简介(2009-01-02 17:07:46)转载▼标签:mysqlauto_incrementit分类: oracle可使用复合索引在同一个数据表里创建多个相互独立的自增序列,具体做法是这样的:为数据表创建一个由多个数据列组成的PRIMARY KEY OR UNIQUE索引,并把AUTO_INCREMENT数据列包括在这个索引里作为它的最后一个数据列。这样,这个复合索引里,前面的那些数据列每构成一种独一无二的组合,最末尾的AUTO_I
阅读全文
摘要:sqlmap.py Database injection and hak
阅读全文