alpine linux mysql java环境

Created: Aug. 27, 2018, 1:41 p.m. Updated: Aug. 27, 2018, 10:23 p.m.

在alpine下安装mysql,实际上是MariaDB

java为openjdk 8

安装 mysql服务端和客户端

# apk add mysql mysql-client

初始化数据库

mysql_install_db --user=mysql

启动服务

mysqld_safe

安全设置

mysql_secure_installation 

修改密码

'/usr/bin/mysqladmin' -u root password 'new-password'
'/usr/bin/mysqladmin' -u root -h da6ba3333af7 password 'new-password'

创建数据库

[MariaDB [(none)]> create database deyun charset=utf8;

安装java,openjdk8-jre

# apk add openjdk8-jre

# java -version
openjdk version "1.8.0_171"
OpenJDK Runtime Environment (IcedTea 3.8.0) (Alpine 8.171.11-r0)
OpenJDK 64-Bit Server VM (build 25.171-b11, mixed mode)