首页 > 代码库 > hive
hive
http://www.cloudera.com/content/cloudera/en/documentation/cloudera-manager/v5-0-0/Cloudera-Manager-Installation-Guide/cm5ig_mysql.html#cmig_topic_5_5
Hive is not configured with ZooKeeper Service
1 安装mysql server
sudoyum install mysql-server
2停止mysqlserver的运行
sudoservice mysqld stop
3配置mysqlserver
vim/etc/my.cnf
内容如下:
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
port=3300
transaction-isolation=READ-COMMITTED
max_connections=550
#Disabling symbolic-links is recommended to prevent assorted securityrisks
symbolic-links=0
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
#InnoDBsettings
innodb_file_per_table= 1
innodb_flush_log_at_trx_commit = 2
innodb_log_buffer_size = 64M
innodb_buffer_pool_size = 4G
innodb_thread_concurrency = 8
innodb_flush_method = O_DIRECT
innodb_log_file_size= 512M
4确保mysql服务在服务器启动时,就会被启动
sudo/sbin/chkconfig mysqld on
sudo/sbin/chkconfig --list mysqld
5 启动mysql服务
sudoservice mysqld start
6设置mysqlroot的密码
如下:红色文字为需要输入的。
$sudo /usr/bin/mysql_secure_installation
[...]
Entercurrent password for root (enter for none):
OK,successfully used password, moving on...
[...]
Setroot password? [Y/n] y
Newpassword:
Re-enternew password:
Removeanonymous users? [Y/n] Y
[...]
Disallowroot login remotely? [Y/n] N
[...]
Removetest database and access to it [Y/n] Y
[...]
Reloadprivilege tables now? [Y/n] Y
Alldone!
端口也已打开:
#netstat -tlnp |grep mysql
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 9929/mysqld
hive