World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.
Java ai-catalogdata-catalogdatalakefederated-querylakehousemetadatametalakemodel-catalogopendatacatalogskycomputingstratosphere
[#508] support connect mysql by apps out of docker (#511)
FANNGec451b918a76
diff --git a/dev/docker/hive/Dockerfile b/dev/docker/hive/Dockerfileindex 303189035e..92a1409291 100644--- a/dev/docker/hive/Dockerfile+++ b/dev/docker/hive/Dockerfile@@ -125,6 +125,7 @@ RUN apt-get install -y mysql-serverRUN chown -R mysql:mysql /var/lib/mysqlRUN usermod -d /var/lib/mysql/ mysql+RUN sed -i "s/.*bind-address.*/bind-address = 0.0.0.0/" /etc/mysql/mysql.conf.d/mysqld.cnf################################################################################# add mysql jdbc driver@@ -154,10 +155,10 @@ RUN rm -rf /tmp/packages################################################################################# expose port-EXPOSE 22 8088 9000 9083 10000 10002 50070 50075+EXPOSE 22 3306 8088 9000 9083 10000 10002 50070 50075################################################################################# create startup script and set ENTRYPOINTWORKDIR /ADD start.sh /usr/local/sbin-ENTRYPOINT ["/bin/bash", "/usr/local/sbin/start.sh"]\ No newline at end of file+ENTRYPOINT ["/bin/bash", "/usr/local/sbin/start.sh"]diff --git a/dev/docker/hive/README.md b/dev/docker/hive/README.mdindex 68b487ccd0..fc46023eb0 100644--- a/dev/docker/hive/README.md+++ b/dev/docker/hive/README.md@@ -48,3 +48,8 @@ ssh -p 8022 datastrato@localhost (password: ds123, this is a sudo user)- base on `datastrato/graviton-ci-hive:0.1.1`- Modify `fs.defaultFS` from `local` to `0.0.0.0` in the `core-site.xml` file.- Expose `9000` port int the `Dockerfile` file.++### 0.1.3+- change mysql bind-address from `127.0.0.1` to `0.0.0.0`+- add `iceberg` to mysql users with password `iceberg`+- export `3306` port for mysqldiff --git a/dev/docker/hive/start.sh b/dev/docker/hive/start.shindex 2bd182117a..8f9357c478 100644--- a/dev/docker/hive/start.sh+++ b/dev/docker/hive/start.sh@@ -31,6 +31,8 @@ echo """CREATE USER 'hive'@'localhost' IDENTIFIED BY 'hive';GRANT ALL PRIVILEGES on *.* to 'hive'@'localhost' WITH GRANT OPTION;GRANT ALL on hive.* to 'hive'@'localhost' IDENTIFIED BY 'hive';+ CREATE USER 'iceberg'@'*' IDENTIFIED BY 'iceberg';+ GRANT ALL PRIVILEGES on *.* to 'iceberg'@'%' identified by 'iceberg' with grant option;FLUSH PRIVILEGES;CREATE DATABASE hive;""" | mysql --user=root --password=${MYSQL_PWD}