Mysql
askingneil
这个作者很懒,什么都没留下…
展开
-
ubuntu 下 mysql 开启远程连接
1.修改/etc/mysql/my.conf,修改bind-address,指定为本机实际ip地址,你的my.con修改完大概是如下的样子 [mysqld] ## * basic settings#default-character-set=utf8default-storage-engine=innodbbind-address = 192.168.1.100us...原创 2011-12-15 11:11:11 · 68 阅读 · 0 评论 -
MYSQL修改密码
(适用于管理员或者有全局权限的用户重设其它用户的密码)进入命令行模式mysql -u root mysql mysql> UPDATE user SET password=PASSWORD("new password") WHERE user='name';mysql> FLUSH PRIVILEGES;mysql> QUIT ...原创 2011-12-21 17:52:16 · 57 阅读 · 0 评论 -
Django extra find_in_set
House.objects.extra(where=["id In (%s) order by find_in_set(id,'%s')" % (r.idlist, r.idlist.replace(' ', ''))])原创 2012-02-20 17:40:21 · 842 阅读 · 0 评论 -
mysql中IN子查询排序
这几天做一个查询,需要在一个指定的结果集中进行查询,例如:select * from table_name where doc_id IN ('1dba', 'c20a', '907b') 其中IN子句中的doc_id列表是通过调用一个外部接口获得一组doc_id常量列表,然后在本地库中搜索符合这个列表的数据记录。后来发现mysql返回的结果集的排序是按照入库顺序给出的,但是我希望...原创 2012-02-20 17:41:11 · 149 阅读 · 0 评论 -
关于PYTHON_EGG_CACHE无权
$ cd /python-path/site-packages/$ mv MySQL_python-1.2.3c1-py2.5-linux-x86_64.egg foo.zip$ mkdir MySQL_python-1.2.3c1-py2.5-linux-x86_64.egg$ cd MySQL_python-1.2.3c1-py2.5-linux-x86_64.egg$ unz...原创 2012-02-29 11:00:05 · 141 阅读 · 0 评论 -
mysql 配置
[mysqld] # The TCP/IP Port the MySQL Server will listen onport=3306wait_timeout=31536000interactive_timeout=31536000原创 2012-11-29 09:35:50 · 77 阅读 · 0 评论