kezhenxu94 commented on PR #10399:
URL: 
https://github.com/apache/dolphinscheduler/pull/10399#issuecomment-1153797154

   > > If we set database to mysql in dolphinscheduler_env.sh, when running 
upgrade-schema.sh in tools, will get errors like Caused by: 
java.lang.RuntimeException: Driver com.mysql.cj.jdbc.Driver claims to not 
accept jdbcUrl, jdbc:postgresql://127.0.0.1:5432/dolphinscheduler
   > 
   > 
   > 
   > Does it means we should also set `SPRING_DATASOURCE_URL` in 
`dolphinscheduler_env.sh`. you adding in this PR only a default value of 
database connection, if user database not in the same mechine of 
dolphinscheduler service it will throw error too.
   
   We don't need to set that. What we want in the yaml is indeed default value. 
So before and after this PR when users set up in their production environment 
they are expected to set `SPRING_DATASOURCE_URL`. This PR is just for 
convenience that some users/developers want to test locally and the MYSQL url 
happens to be localhost. 
   
   P.S. the reason why I write `export SPRING_DATASOURCE_URL` without a value 
is that, users might just set the variable without exporting it, that might not 
work in Spring so we just export it with the value users set. 
   
   ```shell
   SPRING_DATASOURCE_URL=xxxx # note no "export"
   daemon.sh start standalone-server
   ```


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to