mysql 5.0 to mysql 5.1的BTREE索引问题
我本机测试是安装的 mysql 5.1 , 但 centos 服务器上确是使用的 mysql 5.0 , 平时没发现差别, 但最近sql 文件导入导出时发现了, 一点小小差别.
主要是在处理到索引语句时出现了不兼容的情况, 比如下面语句是在 mysql 5.1 导出的:
KEY `index_2` (`datatype`,`stime`,`line`,`mcode`) USING BTREE
如果想导入到 mysql 5.0 则调整 USING BTREE 这类指定索引类型语句的位置到中间, 为:
KEY `index_2` USING BTREE (`datatype`,`stime`,`line`,`mcode`)
相关文档:
启动mysql的服务经常发现1067这个错误。查看事件日志以后发现下面的错误信息
Unknown/unsupported table type: INNODB
如何解决:在mysql数据存放目录下找到 ibdata 以及ib_logfile0、ib_logfile1删掉再启动就好了 ......
转自http://www.linuxbyte.org/yi-ge-mysql-server-shang-de-xiao-ji-qiao.html
在my.cnf 的 mysql 端 添加如下设置
[mysql]
#no-auto-rehash # faster start of mysql but no tab completition
prompt="(\u:mysql1@linuxbyte.org \R:\m)[\d]: "
会产生如下效果:
root@ubuntu:/home/hew# mysql -u hew -p
Enter pass ......
Doing INTERSECT and MINUS in MySQL
By Carsten | October 3, 2005
Doing an INTERSECT
An INTERSECT is simply an inner join where we compare the tuples of one table with those of the other, and select those that appear in both while weeding out duplicates. So
SELECT member_id, name from a
INTERSECT ......
C#连接MySQL数据库方法
1、用MySQLDriverCS连接MySQL数据库先下载和安装MySQLDriverCS,地址:
http://sourceforge.net/projects/mysqldrivercs
在安装文件夹下面找到MySQLDriver.dll,然后将MySQLDriver.dll添加引用到项目中
注:我下载的是版本是 MySQLDriverCS-n-EasyQueryTools-4.0.1-DotNet2.0.exe
using System; ......
package com.wxpn.tutorial.db;
import java.io.IOException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.SQLWarning;
import java.sql.Statement;
import java.util.Date;
/**
* 描述: 数据库连接池类
*
*
&n ......