choerodon / manager-service

This service is the management center of the choerodon microservices framework.
http://choerodon.io
Apache License 2.0
15 stars 25 forks source link

no script file "init-local-database.sh" #1

Closed liuneng1994 closed 6 years ago

devane001 commented 6 years ago

There is a mistake in READEME. We will update the README as soon as possible.

You can use the following script to initialize the database as a temporary solution.

Create a manager_service database in MySQL:

CREATE USER 'choerodon'@'%' IDENTIFIED BY "123456";
CREATE DATABASE manager_service DEFAULT CHARACTER SET utf8;
GRANT ALL PRIVILEGES ON manager_service.* TO choerodon@'%';
FLUSH PRIVILEGES;

New file of init-local-database.sh in the root directory of the manager-service project:

mkdir -p target
if [ ! -f target/choerodon-tool-liquibase.jar ]
then
    curl http://nexus.choerodon.com.cn/repository/choerodon-release/io/choerodon/choerodon-tool-liquibase/0.5.0.RELEASE/choerodon-tool-liquibase-0.5.0.RELEASE.jar -o target/choerodon-tool-liquibase.jar
fi
java -Dspring.datasource.url="jdbc:mysql://localhost/manager_service?useUnicode=true&characterEncoding=utf-8&useSSL=false" \
 -Dspring.datasource.username=choerodon \
 -Dspring.datasource.password=123456 \
 -Ddata.drop=false -Ddata.init=true \
 -Ddata.dir=src/main/resources \
 -jar target/choerodon-tool-liquibase.jar

And executed in the root directory of the manager-service project:

sh init-local-database.sh