MySQL

Learn how to set up a managed MySQL database in Codesphere.

December 14, 2023 2 Min Read
MySQL
MySQL

Alexander Voll

Product Marketing Engineer

Table of Contents

MySQL is an open-source relational database management system (RDBMS) that's commonly used in a wide variety of applications, from websites to banking software. MySQL excels in terms of speed, reliability, and ease of use. It offers strong support for integration with PHP and a large variety of other programming languages, which makes it an ideal choice for web-based applications.

Set up your database

MySQL integration is available as a managed service right inside of Codesphere through the Marketplace. You can access it from your Dashboard by clicking the Marketplace tab.

From here, select the MySQL integration and configure it according to your project needs.

While setting up, you'll see an option to add standby nodes. These nodes are copies of your main database, or primary node, and they automatically step in if the main one fails.

They keep up-to-date with the primary node by copying its changes. This ensures a quick switch if anything goes wrong. Standby nodes are particularly important for production environments, where you need high availability of your database and any downtime has immediate monetary implications.

The number of standby nodes you can add depends on the plan you choose.

Your database will then be created. This will take several minutes depending on the configuration. Please be patient until the creation is finished. You can check the status of your database from your Dashboard as well under the Databases tab. Once the process has finished, you will be able to access your database's Connection Parameters by clicking Show info.

You can now use your database in your desired project. To connect to the database, you will need to utilize the connection parameters. The Host parameter specifies the location of your database. Note that you will also need to append the port number to your host in your project.

To get an idea of how an implementation of your database might look, have a look at our tutorial on how to set up a WooCommerce Store in Codesphere. This tutorial explains how you set up a WooCommerce store and connect a MySQL database.

About the Author

MySQL

Alexander Voll

Product Marketing Engineer

Alex brings a unique perspective through interdisciplinary experience from various corporate stops. He's responsible for most outward facing web applications, including the website and the blog.

More Posts

Deploying Landscapes on Codesphere

Deploying Landscapes on Codesphere

Learn how to deploy and run multiple services that can independently scale vertically and horizontally within a single workspace. Suitable for hosting entire application landscapes.

Monitoring & Alerting

Monitoring & Alerting

Learn how to access Codesphere's built in resource monitoring and check the uptime of your applications.

Path-Based Routing

Path-Based Routing

Learn how to connect multiple independent applications to a single domain by associating different paths with distinct workspaces