dosubot[bot] commented on issue #7808: URL: https://github.com/apache/incubator-devlake/issues/7808#issuecomment-2263522805
<!-- Answer --> To connect to the MySQL database within the Kubernetes cluster that uses PVC storage, you can use port forwarding to access the database from your local machine. Here are the steps: 1. **Port Forward the MySQL Service**: Use the following command to forward the MySQL port (3306) from the Kubernetes cluster to your local machine: ```sh kubectl port-forward service/devlake-mysql 3306:3306 ``` This command will forward the MySQL service port (3306) in the Kubernetes cluster to your local machine's port 3306. 2. **Connect to the MySQL Database**: Once the port forwarding is set up, you can connect to the MySQL database using a MySQL client on your local machine. Use the following command: ```sh mysql -u merico -pmerico -h 127.0.0.1 -P 3306 lake ``` - **Username:** `merico` - **Password:** `merico` - **Database:** `lake` - **Host:** `127.0.0.1` - **Port:** `3306` This setup allows you to access the MySQL database running in the Kubernetes cluster as if it were running locally on your machine <sup>[[1]](https://github.com/apache/incubator-devlake-website/blob/main/docs/GettingStarted/HelmSetup.md)</sup><sup>[[2]](https://github.com/apache/incubator-devlake-website/blob/main/versioned_docs/version-v0.15/GettingStarted/HelmSetup.md)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* -- 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: dev-unsubscr...@devlake.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org