随笔分类 -  MySQL

摘要:mysqld_multi 命令实现管理 1. 每个mysql实例都需要有独立的数据目录, socket链接, 端口. 所以, 为每个实例创建数据目录 到mysql的数据目录下, 复制整个目录(有几个实例,就复制几份), 命名为新的实例名字(任意) (本例子拷贝了3份,分别放在/var/data/... 阅读全文
posted @ 2015-12-22 16:18 arvim 阅读(441) 评论(0) 推荐(0) 编辑
摘要:## InnoDB存储引擎 外键约束 ##语法:```sqlCREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name [CONSTRAINT [symbol]] FOREIGN KEY [index_name] (index_col_name,...)REF... 阅读全文
posted @ 2015-08-14 11:22 arvim 阅读(650) 评论(0) 推荐(0) 编辑
摘要:mysql复习一:复习前的准备1:确认你已安装wamp2:确认你已安装ecshop,并且ecshop的数据库名为shop二 基础知识:1.数据库的连接mysql -u -p -h-u 用户名-p 密码-h host主机2:库级知识2.1 显示数据库: show databases;2.2 选择数据库... 阅读全文
posted @ 2015-04-17 23:21 arvim 阅读(478) 评论(0) 推荐(0) 编辑
摘要:1.表结构mysql> select * from allStudents;+----+-------+| id | name |+----+-------+| 1 | ???? || 2 | ???? || 3 | ???· | 4 | four |+----+-------+4 rows in set (0.00 sec)mysql> select * from currentStudents;+----+--------+| id | name |+----+--------+| 1 | luowen || 3 | 毛毛想 |+----+--------+2.... 阅读全文
posted @ 2014-02-13 21:53 arvim 阅读(1915) 评论(0) 推荐(0) 编辑
摘要:/* Mysql基础操作(优化) @auther: luowen @time: 2013-07-26 1.mysql复制表机构和表数据 create table t1 like t2; insert into t1 select * from t2; 2.mysql创建索引 method 1: increate [unique] [index] [primary key] indexName on t1(name); sho... 阅读全文
posted @ 2013-08-01 17:26 arvim 阅读(339) 评论(0) 推荐(0) 编辑
摘要:/* Mysql基础操作(优化) @auther: luowen @time: 2013-07-26 1.mysql复制表机构和表数据 create table t1 like t2; insert into t1 select * from t2; 2.mysql创建索引 method 1: increate [unique] [index] [primary key] indexName on t1(name); show... 阅读全文
posted @ 2013-07-26 17:58 arvim 阅读(300) 评论(0) 推荐(0) 编辑
摘要:/** *mysql 数据分区实验 *@auther:luowen *@time:2013-07-26 */ // 1.创建分区表 /* 分区类型 1.range分区(按照一段区间分区) 2.list分区(按照在那个集合里面分区) 3.hash分区(随机按一定大小分区) 4.listhash分区 */ create table part value( id int primary... 阅读全文
posted @ 2013-07-26 16:07 arvim 阅读(297) 评论(0) 推荐(0) 编辑
摘要:/* @author:luowen @time:20113-07-24 给从服务器设置权限该用户 grant all on *.* to user@192.168.16.88 identified by 'passwd'; grant replication slave on *.* user@192.168.16.87 identifiend by 'pass' 在mysql 配置文件中打开bin-log日志选择项 查看最后一个bin-log 日志 show master stat... 阅读全文
posted @ 2013-07-24 17:50 arvim 阅读(266) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示