标签:
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
sudo
yum install mysql-server
2 停止mysql server的运行
sudo
service mysqld stop
3 配置mysql server
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 security risks
symbolic-links=0
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
#InnoDB settings
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服务
sudo
service mysqld start
6 设置mysql root的密码
如下:红色文字为需要输入的。
$
sudo /usr/bin/mysql_secure_installation
[...]
Enter
current password for root (enter for none):
OK,
successfully used password, moving on...
[...]
Set
root password? [Y/n] y
New
password:
Re-enter
new password:
Remove
anonymous users? [Y/n] Y
[...]
Disallow
root login remotely? [Y/n] N
[...]
Remove
test database and access to it [Y/n] Y
[...]
Reload
privilege tables now? [Y/n] Y
All
done!
端口也已打开:
#netstat -tlnp |grep mysql
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 9929/mysqld
标签:
原文地址:http://www.cnblogs.com/syx-1987/p/4192170.html