You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2019/03/09 07:29:06 UTC
[GitHub] [servicecomb-pack] WillemJiang commented on a change in pull request #424: [SCB-1190] Update the mysql manual for use the loader.path property to …
WillemJiang commented on a change in pull request #424: [SCB-1190] Update the mysql manual for use the loader.path property to …
URL: https://github.com/apache/servicecomb-pack/pull/424#discussion_r263990011
##########
File path: docs/faq/en/how_to_use_mysql_as_alpha_backend_database.md
##########
@@ -1,46 +1,32 @@
**Problem:** How to use MySQL as alpha's backend database?
**Solution:** To replace the default database from postgreSQL to MySQL:
-1. add dependency of `mysql-connector-java` in `alpha/alpha-server/pom.xml`
- ```xml
- <dependency>
- <groupId>mysql</groupId>
- <artifactId>mysql-connector-java</artifactId>
- </dependency>
- ```
-
-2. install Saga
- ```bash
- mvn clean package -Pdocker -DskipTests
- ```
- After that, you will find the generated docker image `alpha-server` and executable file `alpha/alpha-server/target/saga/alpha-server-${version}-exec.jar`.
-
- **Notice**: If you do not want to build the docker image, run `mvn clean package -DskipTests` is enough.
-
- **Notice**: If you have installed saga with docker before, you need to remove the alpha-server's docker image first.
- ```bash
- docker rmi -f $(docker images | grep alpha-server | awk '{print $3}')
- ```
-
-3. run MySQL
+1. run MySQL
```bash
docker run -d -e "MYSQL_ROOT_PASSWORD=password" -e "MYSQL_DATABASE=saga" -e "MYSQL_USER=saga" -e "MYSQL_PASSWORD=password" -p 3306:3306 mysql/mysql-server:5.7
```
-4. Run alpha. Please make sure MySQL is up before this step. You can run alpha through docker or executable file.
+2. Run alpha. Please make sure MySQL is up before this step. You can run alpha through docker or executable file.
* via docker
+
+ Create `libs` directory on the machine, for mount containers internal directory `/maven/saga/libs` , copy ` mysql-connector-java-8.0.15.jar` to the libs directory, uses the `-Dloader.path=/maven/saga/libs` system property and includes all JAR files in this directory and add them in the classpath
Review comment:
We need to tell user how to download the connector jar file.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services