当前位置: 首页 > 工具软件 > InfiniDB > 使用案例 >

infiniDB在linux(centos系统)下的安装使用

颛孙品
2023-12-01

tar包的安装过程:http://www.docin.com/p-166891856.html

 

另一种方法,也可以编译安装(Debian X86_64):http://tech.it168.com/a2011/0216/1157/000001157945.shtml

 

 

 

具体过程:

一、下载最新版源码,地址如下:

http://www.infinidb.org/downloads/

二、在路径/usr/local下解压包

tar -xzvf calpont-infinidb-2.2.4-1.src.tar.gz

 

三、改服务端口,防止被占

cd ../Calpont/mysql
vim my.cnf

将配置文件中port值改为3307。(原值设为3306,如果安装了mysql该端口会被占用)

 

四、运行安装脚本

./post-install
./postConfigure
(或者使用命令:/usr/local/Calpont/mysql/bin/intall-infinidb.sh)

 

五、设置别名和环境变量

命令:. /usr/local/Calpont/bin/calpontAlias

别名命令

alias idbmysql='/usr/local/Calpont/mysql/bin/mysql --defaults-file=/usr/local/Calpont/mysql/my.cnf -u root'

(alias idbmysql='/usr/local/Calpont/mysql/bin/mysql --defaults-file=/usr/local/Calpont/mysql/my.cnf -u root')

alias ll='ls $LS_OPTIONS -l --color=auto'

可将. /usr/local/Calpont/bin/calpontAlias命令放到 ~/.bashrc和/etc/profile 里面,每次新建连接时就不用再手动执行该命令。

 

六、启动服务

/usr/local/Calpont/bin/infinidb start 启动infinidb

或者service infinidb start

停用

/etc/init.d/infinidb stop

/etc/init.d/infinidb start

 

 

七、访问数据库:访问mysql数据库(无密码访问,需要自己再设置密码)

启动数据库命令:

    idbmysql

    mysql> show databases;

 

八,新建用户:

GRANT ALL PRIVILEGES ON *.* TO 'aso'@'localhost' IDENTIFIED BY '123456' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON *.* TO 'aso'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;

 

设置mysql访问密码,删除空用户

  mysql> delete from mysql.user where user='';

  Query OK (0.00 sec)

  mysql> update mysql.user set password=password('123') where user='root' and host='localhost';

  Query OK (0.00 sec)

  Rows matched: 1 Changed: 1 Warnings: 0

  mysql> flush privileges;

  Query OK, 0 rows affected (0.00 sec)

重新登陆mysql

  root@debian:~/package/calpont-infinidb-2.2.4# idbmysql -p

  Enter password:

  Welcome to the MySQL monitor. Commands end with ; or \g.

  Your MySQL connection id is 8

  Server version: 5.1.39 MySQL Community / Calpont InfiniDB Community 2.2.4-1 Final (COSS LA)

  Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

 

 类似资料: