To establish a direct connection between DBeaver and MySQL on Kubernetes without relying on kubectl port-forwarding, you can follow these steps:
Create a Kubernetes service for the MySQL pod or deployment that you want to connect to. This service should expose port 3306, which is the default MySQL port.
Get the hostname and port number of the Kubernetes service that you just created. You can use the following command to get this information:
kubectl get svc <service-name>
Replace <service-name>
with the name of your Kubernetes service.
Configure DBeaver to use the hostname and port number of the Kubernetes service to connect to MySQL. You can create a new database connection in DBeaver and use the following settings:
Replace <service-host>
and <service-port>
with the hostname and port number of your Kubernetes service. Replace <database-name>
, <database-user>
and <database-password>
with the name, user and password of your MySQL database.
Test the connection to MySQL by clicking the "Test connection" button in DBeaver. If the connection is successful, you should be able to see the list of databases and tables in your MySQL database in the DBeaver interface.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2022-10-04 11:00:00 +0000
Seen: 9 times
Last updated: Mar 05 '23
How to deal with an operational error when connecting Django to MySQL?
In this scenario, what is the reason for the WHERE clause in MySQL to produce zero rows?
How can multiple queries be merged into a single stored procedure in MySQL?
What is the method for verifying the existence of a mysql database?
What does "waiting for handler commit" mean in relation to the slow writes experienced in MySQL 8?
What is the process for implementing a Many to Many relationship using NestJs Sequlize and Mysql2?
How can Spring Boot and Mysql be utilized for CRUD operations?
How can I refine the results for a specific column in MySQL?