Fix starting hive failure in Ubuntu xenial
The mysql configuration file name and directory change in Ubuntu 16.04. my.cnf becomes an entry for mysql configuration. The new file locates here: "/etc/mysql/mysql.conf.d/mysqld.cnf" Change-Id: I8f70589cfc904a7d30081172b313ad8e30914935 Closes-Bug: #1738124
This commit is contained in:
parent
2a0fa0d58b
commit
e5f50ed163
|
@ -13,7 +13,13 @@ set -o pipefail
|
|||
if [ "$DISTRO_NAME" = "ubuntu" ]; then
|
||||
if [ -e "/etc/init/mysql.conf" ]; then
|
||||
sed -i "s/start on runlevel \[.*\]/start on never runlevel [2345]/g" /etc/init/mysql.conf
|
||||
sed -i '/bind-address/d' /etc/mysql/my.cnf
|
||||
# The mysql configuration file name and directory changed in Ubuntu Xenial.
|
||||
# TODO(shuyingya): delete this if statement when we not support trusty
|
||||
if [ "$DIB_RELEASE" = "trusty" ]; then
|
||||
sed -i '/bind-address/d' /etc/mysql/my.cnf
|
||||
elif [ "$DIB_RELEASE" = "xenial" ]; then
|
||||
sed -i '/bind-address/d' /etc/mysql/mysql.conf.d/mysqld.cnf
|
||||
fi
|
||||
else
|
||||
update-rc.d -f mysql remove
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue