易截截图软件、单文件、免安装、纯绿色、仅160KB

mysql基本用法

http://dev.mysql.com/doc/refman/5.1/zh/index.html
(MySql 5.1 中文参考手册)
*------------------------------------------------------------------------------------------
show databases; 显示数据库
drop database 数据库名;删除数据库
set names 'utf8';设置数据库编码为utf-8
source x:\数据库名.sql;导入一个数据库
USE 数据库名;尝试存取数据库
CREATE DATABASE 数据库名;创建一个数据库
*---------------------------------------------------------------------------------------------
为表增加索引:alter table 表名 add index 索引名 ('字段名');
为表增加外键: (例表A的uid是外键,对应表B的id) (表类型为InnoDB才有外键约束)
                 alter table A add foreign key (uid) references B (id) on delete restrict on update restrict;
*--------------------------------------------------------------------------------------------
Mysql的导入和导出
mysqldump -u root -pYOURPASSWORD DATA_BASE_NAME >mydatabasebak.sql
::是把 数据库 DATA_BASE_NAME 备份到文本文件 mydatabasebak.sql
scp mydatabasebak.sql username@192.168.0.114:.
输入用户username 的密码.
ssh 192.168.0.114
mysql -u root -p # 输入密码后进入Mysql 命令行模式
sql>create database DATA_BASE_NAME;
sql> use DATA_BASE_NAME; # 数据库名字,切换要导入的目标数据库。
sql> set names 'utf8'; # 这一步相当重要,如果原始SQL文件编码是utf8的,不加上这个语句,导入后中文是乱码
sql> source mydatabasebak.sql; # 开始导入数据。
*---------------------------------------------------------------------------------------------------------------


相关文档:

MySQL Cluster Overview


MySQL Cluster
is a technology that enables
clustering of in-memory databases in a shared-nothing system. The
shared-nothing architecture allows the system to work with very
inexpensive hardware, and with a minimum of specific requirements
for hardware or software.

......

MySQL Cluster Multi Computer How To


This section is a “How-To
” that describes the basics
for how to plan, install, configure, and run a MySQL Cluster.
Whereas the examples in
Chapter 3, MySQL Cluster Configuration
provide more in-depth
information on a variety of clustering options and co ......

PHP新的连接MySQL方法mysqli

PHP新的连接MySQL方法mysqli
1. 开启PHP的API支持
(1)首先修改您的php.ini的配置文件。
      查找下面的语句:
      ;extension=php_mysqli.dll
      将其修改为:
      extension=php_mysqli.dll
......

Mysql的DBHelper.cs

using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using MySql.Data.MySqlClient;
namespace i_salesDAL
{
public class DBHelper
{
//引导数据库连接数据库调用Web.Config文件
private static MySqlConnection connection;
//创建 ......

excel数据批量导入到Mysql数据库

aspx页面
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="customin.aspx.cs" Inherits="kf_customin" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号