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
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
root@debian:~/package/calpont-infinidb-2.2.4# idbmysql
Enter password:
Welcome to the MySQL monitor.
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.