• linkedu视频
  • 平面设计
  • 电脑入门
  • 操作系统
  • 办公应用
  • 电脑硬件
  • 动画设计
  • 3D设计
  • 网页设计
  • CAD设计
  • 影音处理
  • 数据库
  • 程序设计
  • 认证考试
  • 信息管理
  • 信息安全
菜单
linkedu.com
  • 网页制作
  • 数据库
  • 程序设计
  • 操作系统
  • CMS教程
  • 游戏攻略
  • 脚本语言
  • 平面设计
  • 软件教程
  • 网络安全
  • 电脑知识
  • 服务器
  • 视频教程
  • MsSql
  • Mysql
  • oracle
  • MariaDB
  • DB2
  • SQLite
  • PostgreSQL
  • MongoDB
  • Redis
  • Access
  • 数据库其它
  • sybase
  • HBase
您的位置:首页 > 数据库 >Mysql > MemSQL学习笔记-类似MySQL的数据库

MemSQL学习笔记-类似MySQL的数据库

作者:匿名 字体:[增加 减小] 来源:互联网 时间:2018-12-05

匿名通过本文主要向大家介绍了MemSQL,MySQL等相关知识,希望本文的分享对您有所帮助
http:///


-- 多主-从

http:///
http:///


前facebook员工和前微软sql server工程师联合搞的一个分布式关系数据库
全部内存运行,将sql转化成速度更快的c++, 原理类似HipHop


有mysql api, 完全兼容mysql,没有学习使用成本
速度是mysql的30倍,每秒可处理150万的事务


官方网站:http:///
参考文档:http:///


参考官方文档:http:///
http:///
-- ==============================================================


1 Install

wget http:///
tar xvfz memsqlbin_amd64.tar.gzcd memsqlbin./check_systemWarning: The version of CentOS that you're using (5.5) is too low.MemSQL supports versions 6.0 and up.
/home/manchun/memsqlbin/objdir/usr/local/bin/memsql-g++: /lib64/libc.so.6: version GLIBC_2.11' not
 found (required by /home/manchun/memsqlbin/objdir/usr/local/bin/memsql-g++)


【解决办法】安装glibc

[root@banggo ~]# 
wget http:///
tar zxvf glibc-2.11.tar.gz
cd glibc-2.11
mkdir glibc-2.11-build
退出去在别的目录执行如下编译
/usr/src/glibc-2.11/configure --prefix=/usr/src/glibc-2.11/glibc-2.11-build/
error:
checking for .cfi_personality and .cfi_lsda pseudo-ops... no 
configure: error: assembler too old, .cfi_personality support missing


【解决】
参考网址
http:///
http:///


I couldn't overcome that problem, and I'm wondering how I can, but I 
said, "hey cuda only requires glibc-2.7, so lets compile that". I went 
ahead, and installed it into /share/apps/glibc-2.7. So here comes the 
main question: how can I link CUDA C to the glibc-2.7 installed in 
/share/apps ? Years ago, Tim Carlson has said "It is really not 
practical to try and upgrade glibc to 2.5. You might want to try 
installing a glibc 2.5 from source in /share/apps/glibc-2.5 and then 
use LD_PRELOAD to load that library in for you CMAQ binary.", but I 
don't know how to use LD_PRELOAD, and I would appreciate any 
guideline.

[换成2.8]

[root@banggo ~]# 
wget http:///
tar zxvf glibc-2.8.tar.gz
cd glibc-2.8
mkdir glibc-2.8-build

退出去在别的目录执行如下编译

/usr/src/glibc-2.8/configure --prefix=/usr/src/glibc-2.8/glibc-2.8-build/
make
make install


继续执行刚才的check_system

[root@banggo memsqlbin]# ./check_system
Warning: The version of CentOS that you're using (5.5) is too low.
MemSQL supports versions 6.0 and up.
/home/manchun/memsqlbin/objdir/usr/local/bin/memsql-g++: /lib64/libc.so.6: version 'GLIBC_2.11' not
 found (required by /home/manchun/memsqlbin/objdir/usr/local/bin/memsql-g++)

【】我不得不承认,我out了,仔细一看,原来需要centos 6.0的。



2 重新安装

wget http:///
tar xvfz memsqlbin_amd64.tar.gz
cd memsqlbin
 ./check_system

报错如下:

Warning: The recommended configuration for MemSQL is at least 8 GB of RAM




【】解决方案:

 let "mem_mb=$(free -m | sed  -n -e '/^Mem:/s/^[^0-9]*\([0-9]*\) .*/\1/p')";
if [ $mem_mb -lt 1000 ]; then
    echo "Warning: The recommended configuration for MemSQL is at least 1 GB of RAM" 1>&2
    invalid='1'
fi
[root@memdb memsqlbin]#  ./check_system 
System check successful

3 登陆测试

[root@memdb memsqlbin]#  ./memsqld --port 3308
299691 2012-06-27 13:26:26 WARNING: SSE4.2 is not supported. Resorting to software CRC32C.
497378 2012-06-27 13:26:27 INFO: Log level changed to 0
120627 13:26:27 [ERROR] Fatal error: Please run MemSQL as a non-root user or specify -u root on the command line.
120627 13:26:27 [ERROR] Aborting
120627 13:26:27 [Note] ./memsqld: Shutdown complete
[root@memdb memsqlbin]#  ./memsqld -u root  --port 3308
292356 2012-06-27 13:26:54 WARNING: SSE4.2 is not supported. Resorting to software CRC32C.
480363 2012-06-27 13:26:55 INFO: Log level changed to 0
120627 13:26:55 [Note] ./memsqld: ready for connections.
Version: '1b'  socket: '/tmp/memsql.sock'  port: 3308




4 客户端使用

[root@memdb ~]# mysql -uroot -p -h 127.0.0.1 -P3308 --prompt="MemSQL> "
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 253
Server version: 5.5.8 MemSQL source distribution
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MemSQL> 
MemSQL> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| memsql             |
+--------------------+
2 rows in set (0.00 sec)
MemSQL> use memsql;
Database changed
MemSQL> show tables;
Empty set (0.00 sec)
MemSQL> use information_schema;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
MemSQL> show tables;
+---------------------------------------+
| Tables_in_information_schema          |
+---------------------------------------+
| CHARACTER_SETS                        |
| COLLATIONS                            |
| COLLATION_CHARACTER_SET_APPLICABILITY |
| COLUMNS                               |
| COLUMN_PRIVILEGES                     |
| ENGINES                               |
| EVENTS                                |
| FILES                                 |
| GLOBAL_STATUS                         |
| GLOBAL_VARIABLES                      |
| KEY_COLUMN_USAGE                      |
| PARAMETERS                            |
| PARTITIONS                            |
| PLUGINS                               |
| PROCESSLIST                           |
| PROFILING                             |
| REFERENTIAL_CONSTRAINTS               |
| ROUTINES                              |
| SCHEMATA                              |
| SCHEMA_PRIVILEGES                     |
| STATISTICS                            |
| TABLES                                |
| TABLESPACES                           |
| TABLE_CONSTRAINTS                     |
| TABLE_PRIVILEGES                      |
| TRIGGERS                              |
| USER_PRIVILEGES                       |
| VIEWS                                 |
+---------------------------------------+
28 rows in set (0.00 sec)
MemSQL>

库名字很mysql一模一样啊,好惊奇啊,居然information_schema都有,而且里面的表名字也是一模一样的。

5 配置文件
看看memsql有没有跟mysql类似的配置文件呢,如下,果然找到了

[root@memdb memsqlbin]# ll /root/memsqlbin/memsql.cnf 
-rw-r--r--. 1 1001 1001 1026  6月 18 20:07 /root/memsqlbin/memsql.cnf



6 用户管理测试
-- 创建新账号

MemSQL> grant all on *.* to tim@'%' identified by "tim"  with grant option;
Query OK, 1 row affected (0.01 sec)
MemSQL> exit
Bye

分享到:QQ空间新浪微博腾讯微博微信百度贴吧QQ好友复制网址打印

您可能想查找下面的文章:

  • MemSQL学习笔记-类似MySQL的数据库

相关文章

  • 2018-12-05Mysql慢查询操作的代码总结
  • 2018-12-05mssql 两表合并sql语句
  • 2018-12-05MySQL 常用命令
  • 2018-12-05MySQL事务回滚演示详解
  • 2018-12-05全面解析Windows下安装 mysql5.7的方法_MySQL
  • 2018-12-05mysql 不能插入中文问题
  • 2017-05-11MySQL子查询的几种常见形式介绍
  • 2018-12-05FROM_UNIXTIME 格式化MYSQL时间戳函数
  • 2018-12-05mysql数据分组:创建分组
  • 2018-12-05mysql数据库中文乱码的解决方法汇总

文章分类

  • MsSql
  • Mysql
  • oracle
  • MariaDB
  • DB2
  • SQLite
  • PostgreSQL
  • MongoDB
  • Redis
  • Access
  • 数据库其它
  • sybase
  • HBase

最近更新的内容

    • MySQL非主从环境下数据一致性校验及修复程序
    • MySQL UPDATE更新语句精解第1/4页
    • MySQL Semisynchronous Replication介绍
    • 超详细mysql left join,right join,inner join用法分析
    • asp.net 将图片上传到mysql数据库的方法
    • pt-online-schema-change进行MySQL表的主键变更
    • MYSQL基础之连接MYSQL、修改密码、添加用户
    • 关于如何提高效率和安全性等方面总结分享
    • 介绍几种Mysql多字段大表的优化方法
    • SQLServer触发器创建、删除、修改、查看示例代码

关于我们 - 联系我们 - 免责声明 - 网站地图

©2020-2025 All Rights Reserved. linkedu.com 版权所有