Creating cloud, provisioning database and dbeaver and connect it to code quickly

王林
Release: 2024-07-20 07:00:23
Original
982 people have browsed it

Creating cloud, provisioning database and dbeaver and connect it to code quickly

https://youtu.be/7EfYn7MkdyI?si=mRekrHtNc7pjO8Gb

In the video above, I'm showcasing how to create cloud, provision MySQL database and dbeaver and then how I connect all of it to my code quickly.

Here's a more detailed explanation:

  1. We log in to Qubinets and go through the new cloud setup.

  2. We pick from the set of application we are going to use (in our case MySQL). We also added DBeaver for database management and Ingress Nginx for connectivity to our MySQL instance.

  3. We chose our preferred cloud provider and completed the setup by clicking on “Instantiate Cloud.” Once the cloud setup was complete, we connected our applications. We changed the database name to “Qubinets” and updated this in the connection settings in DBeaver. Ensured the port for the MySQL connection was set to 3306.

  4. In our IDE, we wrote a Python script to connect to the MySQL database. We used the connection details (username, password, database name, and host) within our script.

  5. For deployment purposes, we set these connection details as environment variables.

  6. We wrote SQL queries to create a table named “customers” and insert a new customer record into this table.

  7. After deploying our applications, we retrieved the external address of the Ingress Nginx and used it to run our Python script.

  8. We opened DBeaver, which prompted us to set up the connection using our MySQL host, username, and password.

  9. We confirmed that the “customers” table existed and the inserted data was present.

  10. To ensure persistence, we added another customer record and verified it in DBeaver.

In summary, we created a cloud, provisioned MySQL and DBeaver, connected them with Ingress Nginx, wrote and ran a Python script to interact with the database, and verified everything in DBeaver—all in 30 minutes. All of this was done with the help of Qubinets.

The above is the detailed content of Creating cloud, provisioning database and dbeaver and connect it to code quickly. For more information, please follow other related articles on the PHP Chinese website!

source:dev.to
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!