infiniDB在linux(centos系统)下的安装使用
2014-01-13 17:52
507 查看
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.
另一种方法,也可以编译安装(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.
相关文章推荐
- infiniDB在linux(centos系统)下的安装使用
- LINUX下使用elasticsearch-jdbc工具实现MySQL同步到ElasticSearch 以及linux 64位centos系统安装jdk1.8
- 使用VMmare给虚拟机安装linux系统-CentOS-6.9与Centos-7
- 查看linux安装系统时所使用的readhat还是centos
- 关于linux - Centos 7 系统下使用PXE网络的方式(pxe+dhcpd+tftp+httpd)安装操作系统
- Linux下安装使用无线网卡(系统:centos 6.5 无线网卡:TL-WN725N V2)
- 使用u盘安装linux系统—Centos6.2_i386
- linux使用-ubuntu系统mysql的安装
- CentOS系统使用yum安装MariaDB数据库实现多实例
- Linux系统CentOS在VMware下的安装图解
- Linux系统中安装和使用Axel下载工具的教程
- 使用U盘安装linux系统
- CentOS或Linux下使用yum安装配置和使用svn
- Linux系统下安装rz/sz命令及使用说明
- 使用VMware Workstation安装Linux系统
- Linux(ubuntu/Centos) 使用Tomcat 部署Java项目 附带安装JDK+数据库
- linux系统CentOs 7环境下安装Tomcat8
- 使用virtualbox安装Linux系统
- Linux系统安装后的基础优化-基于CentOS(5.8/6.4)
- CentOS dnsmasq 功能外篇——配置PXE服务并使用kickstart安装配置系统