# Connecting to an external mysql database

**URL:** https://discuss.kubernetes.io/t/connecting-to-an-external-mysql-database/8201
**Category:** General Discussions
**Created:** [October 2, 2019, 4:38pm UTC](https://discuss.kubernetes.io/t/connecting-to-an-external-mysql-database/8201 "2019-10-02T16:38:07Z")
**Posts on this page:** 1
**Showing post:** 10

<div class="post-metadata">

### Author: ![Sharanya\_M](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/sharanya_m/32/4162_2.png) [@Sharanya\_M](https://discuss.kubernetes.io/u/Sharanya_M)
#### Post date: [July 17, 2020, 9:09am UTC](https://discuss.kubernetes.io/t/connecting-to-an-external-mysql-database/8201/10 "2020-07-17T09:09:48Z")

</div>

sure… here you go…

kind: Service  
apiVersion: v1  
metadata:  
name: /\*\* oracle server name which is configured in springboot application.yml file … Ex - oracleserver **/  
spec:  
type: ExternalName  
externalName: /** oracle hostname. Ex - [oracleserver.xx.yyy.com](http://oracleserver.xx.yyy.com) \*\*/

## Springboot application.yml

spring:  
#profiles: dev  
datasource:  
jdbc-url: ‘jdbc:oracle:thin:@oracleserver.xx.yyy.com:port/service\_id’  
username: xxxx  
password: yyy  
driver-class-name: oracle.jdbc.OracleDriver

---

_[View the full topic](https://discuss.kubernetes.io/t/connecting-to-an-external-mysql-database/8201)._
