2020年8月17日 星期一

install mysql in ubuntu18.04 of docker

LIBDBUSMENU-GLIB-WARNING **: Unable to get session bus: Failed to execute child process “dbus-launch” (No such file or directory)
  • $ sudo apt-get install dbus-x11



org.freedesktop.DBus.Error.ServiceUnknown
  • $ sudo apt-get install -y gnome-keyring
ref: Here


MySQL開放對外連線
  • 修改
    $ sudo vim /etc/mysql/mysql.conf.d/mysqld.cnf

    bind-address = 192.168.1.2
  • 確認
    $ netstat -tulpn | grep LISTEN
    or
    $ netstat -tulpnc | grep LISTEN
    (No info could be read for "-p": geteuid()=1000 but you should be root.)
    tcp 0 0 192.168.1.2:3306 0.0.0.0:* LISTEN



Java設定
  • Java
    export PATH=/opt/java/jdk-11.0.8/bin:$PATH
    export JAVA_HOME=/opt/java/jdk-11.0.8
    export JRE_HOME=$JAVA_HOME
  • MySQL
    export CLASSPATH=/usr/share/java/mysql-connector-java-8.0.21.jar:$CLASSPATH

沒有留言:

張貼留言